Checkbox not getting checked

275 views
Skip to first unread message

Perry

unread,
Nov 16, 2022, 6:06:51 PM11/16/22
to Autofill Extension
I have two checkboxes next to each other. I would like to check them both. The Autofill rule I've created only checks the first checkbox and not the second checkbox. The rule is matching on the "ng-model" attribute of the checkboxes. I've attempted to change the value field of the rule to "1!" and "11" as well but no luck.

Autofill rule:
Type: Checkbox/Radio
Name: include
Value: 1

<div class="col-md-12 col-sm-12">    
  <div class="col-md-3 col-sm-12">
    <input ng-model="vm.includeWCIAJsonLink" checked="checked" type="checkbox" class="ng-untouched ng-valid ng-not-empty ng-dirty ng-valid-parse"> 
    <label style="font-size: .8em"> Include WCIA JSON Link</label>
  </div>
  <div class="col-md-3 col-sm-12">
    <input ng-model="vm.includeCOA" checked="checked" type="checkbox" class="ng-untouched ng-valid ng-dirty ng-empty" style=""> 
    <label style="font-size: .8em"> Include COA</label>
  </div>             
</div>

turbowells

unread,
Nov 17, 2022, 9:19:03 AM11/17/22
to Autofill Extension
The ng-model attribute is supported by Autofill, so it *should* work as automatically generated:

^vm.includeWCIAJsonLink$
^vm.includeCOA$

I pasted your html into a page (without the checked) and Autofill did check both boxes.

If it's not working, you can try to add a delay to see if that's the issue.  Also enable Autofill Debug and see if Autofill is attempting to fill the boxes by watching the console.

Perry

unread,
Nov 17, 2022, 5:55:51 PM11/17/22
to Autofill Extension
Thanks for the second pair of eyes and the tips on the delay and debug. I didn't know about those. 

I also should have explained that my issue's not so cut and dry. The checkboxes are located on a pop-up that appears after clicking a button on the page. So when the page loads, the autofill rule fires correctly (via the debug output) and I can go inspect the input elements before clicking the pop-up button. When I inspect them before opening the pop-up, the class attribute on both of them shows as "ng-untouched ng-valid ng-not-empty ng-dirty ng-valid-parse" but when I open the pop-up, the second input element's class attribute changes to "ng-untouched ng-valid ng-dirty ng-empty". So it seems like the second checkbox clears itself after I open the pop-up. I guess it might be best to have this rule fire on a hotkey since I don't think it can deal with this pop-up scenario. 

Reply all
Reply to author
Forward
0 new messages