sarahavilov / autofillforms-e10s

A multi browser extension that enables you to fill out web forms with one click
https://webextension.org/listing/autofill-forms.html
57 stars 35 forks source link

Checkboxes & radio buttons #2

Closed Ileca closed 8 years ago

Ileca commented 8 years ago

Stupid question but I didn't find any documentation to explain what to put as rule value for those inputs. For example, I have four radio buttons with "ar" name, "ar_n" with n=0 to 3 as id and "a" to "d" as value. I tried "c", "ar_2" and "2" but each time the last button was selected.

Same for checkboxes. What value do I need to fill to check/uncheck them? I don't have the use of select inputs but I guess it's the same problem.

Btw, why the use of non-capturing groups, for example why "(?:occupation)|(?:job)" and not "occupation|job"?

sarahavilov commented 8 years ago

Well, using either value attribute or text content should work, however, there was a bug that is fixed now. Please try the dev version and let me know if it works or not https://github.com/sarahavilov/autofillforms-e10s/blob/master/builds/packed/chrome.zip?raw=true

Download the ZIP file and extract it on a folder. Open chrome://extensions/ in a new tab. Disable the AutoFill forms extension and enable "Developer mode". Now point your Chrome or Opera to use the dev version.

Btw, why the use of non-capturing groups, for example why "(?:occupation)|(?:job)" and not "occupation|job"?

We might need to have access to the selected item later to have more flexible filling options. For your custom rules there is no difference.

Ileca commented 8 years ago

Hmmm... I am not using Chrome or Opera, I use Firefox (Developer Edition) and when I load your manifest as a temporary add-on, nothing is responding i.e. when I am clicking on the buttons settings/etc. There is no default profile next to "Fill All Forms" too.

sarahavilov commented 8 years ago

For Firefox try 0.1.1; https://addons.mozilla.org/en-US/firefox/addon/autofill-forms-e10s/versions/

Ileca commented 8 years ago

Radio buttons work but like there is no value for checkboxes (I add a rule without a rule value line), it toggles them, which prevent the add-on to have a determined result. For example, let say I changed settings in a form with your add-on but tweaked it again without your add-on. Now I want to get my default settings back by overwriting my last changes with your add-on. I can't because it will toggle everything.

Can you tell me where are the rules hardcoded? I have 47 checkboxes to enter and your UI is quite annoying if you allow me the adjective when it comes to enter really long list of stuff in a mechanical and boring way.

sarahavilov commented 8 years ago

The issue with the checkboxes is solved in version 0.1.2.

your UI is quite annoying if you allow me the adjective when it comes to enter really long list of stuff in a mechanical and boring way.

What is your proposal?

Ileca commented 8 years ago

Hmmm... the problem is you can't create multiple rules at the same time. You are forced to do it one by one. If you do heavy usage of copy/pasting, you can't because you need to validate the current rule then create a new one. The solution is to come back with editing but if you have 40 rules, you need to do a lot of scrolling. Allow multiple rules creation and editing of the rules directly, not with the dedicated line at the bottom of the list. Maybe even a button to clone a rule on the fly if someone find that useful. That's why I asked you where you hardcoded the rules. If it was a txt with " " formatting, it would have been easy to fill the lines.

One more improvement would be to allow a "root" for the site rule. That would spare the copy/pasting of the exact same domain everywhere. In my case, it is always the same site pattern by profile. In case it isn't, you can still focus on the parts that are not sub-domains.

sarahavilov commented 8 years ago

The new dev version supports exporting and importing. Use it to export all rules. Then modify the JSON list in a text editor and import it back. This way you can easily add multiple rules. For more info please follow https://github.com/sarahavilov/autofillforms-e10s/issues/7