autofillforms-e10s icon indicating copy to clipboard operation
autofillforms-e10s copied to clipboard

Feature request: Copy fields as querystring, fill fields from querystring in clipboard

Open mk-pmb opened this issue 6 years ago • 0 comments

I often encounter websites with broken form submission so I have to fill in the same form over and over. I'd prefer to do that once, then before submit, copy all fields to clipboard, preferably as a querystring. When submit turns out to have failed and I'm back to the form in original state (usually a mixture of empty and wrong values), I'd like to have it populated from clipboard, with the non-standard addition that /\s*\n\s*/ shall be treated as &. Fields not mentioned in the clipped querystring shall be left as they are.

To make this work with form elements that don't have a name but just an id, (better approach below.) we'll need some user-chosen marker. I suggest we confine "marker" to "prefix string" and use U+0007 bell as the default prefix that marks the remainder of the field name as "actually it's an id not a name".

Edit: More deviations from standard:

  • On copy, un-checked checkboxes shall be included in the query with an empty string value. I know this creates ambiguity in case of checkboxes that do have their value explicitly set to the empty string (so it doesn't default to "on") but I've never encountered that on web forms I use so I don't care about this particular edge case.
  • On paste, checkboxes shall be ticked only if either they have no value (…&newsletter&…) or their value is non-empty and exactly as in the querystring, so …&fruit=banana&fruit=orange&… will tick the banana and orange checkboxes but not apple or lemon, even though they are all named "fruit".

Update: Just found a form where the inputs have neither a name nor an id, just the placeholder attribute to distiguish them. The app seems to use one of the CSS classes on an ancestor element of the input fields to address them, but I can't see how to make that work accross sites.

Thus, new idea: Let's make all the field names in the query string start with the best available identifying property (id, name, placeholder), a dot, and then the value of the identifying property.

mk-pmb avatar Aug 16 '17 13:08 mk-pmb