I since discovered the cause: On individual registration, the id/name of the input is correctly identified to the script function, but on group registration, the id/name of the input is affixed with an underscore and sequence number (e.g., _1) that is not recognized by the script.
I use "onblur" to trigger the function, so I need to discover a way to get the function to recognize the specific input element(s) when triggered. For instance, (1) identify the input that triggered the blur, (e.g., YOB_1), (2) identify the corresponding input, (e.g., Category_1), (3) and run the test with those two inputs. Any suggestions dearly welcomed.
I'll post the solution to the forum when I discover it.
Hello Tem, did you find a solution? This may not be what you're needing but I have a "Member ID" custom field in our registration form, with that field having the class "memberId".
Using the Member ID field in my case as an example, to get the attributes of the onblur Member ID field within the members of a group registration, I'm currently using the below event function for the group registration form. I'm sure there's a better way but it's working for me.
On a side note, I using "on('blur', '#eb-form-group-members .memberId'" below to target only the group registration form due to in my case where I'm doing other actions to the group members form that I don't apply to the individual registration form, in some cases just doing "on('blur', '.memberId'" may work.
I've found a solution, but I haven't been able to fully test it yet. I attach my event listener further down in the form, i.e., after the member information portion is created. I also needed to return information from more than one element for each member, so the sequence number was essential for my purposes.
Attaching the event listener at the top of the form, as you did, may work for me, I'll have to give it a try later. I notice that you return both the element name and id, but on my forms the name = id; so returning both would be redundant. Also, 'this" must be returning the event target values, I'll verify this later.
Thanks for following up, I'll be happy to send you my code if you like.
Oh wow, that some great stuff. All I do is pass the couple variables to a PHP file via an AJAX execution to do the member ID validation against a Db table - HA. Nothing near as advanced as what you coded, nice work. Thank you for sharing!