Home › Forums › Quform WordPress › Checkboxes – Search elements and populate based on value
- This topic has 2 replies, 2 voices, and was last updated 5 years, 3 months ago by jerkski.
- AuthorPosts
- January 3, 2019 at 9:37 pm #28111jerkskiParticipant
Hello, is there any way to scour form elements based on the type? I have a script that I am implementing, but due to the way my form is constructed, all of my checkboxes exist in separate groups. Therefore, I do not know which iphorm element number (unless I hard code each of the current 34 groups, which limits future form design) they exist in without manually loading each checkbox group element number one at a time.
Here is what I am trying to achieve:
1. If Checkbox A (in group 1) is checked, trigger event using ajax to grab current user related rows from mysql and store in array.
2. Use data in array to auto-select associated checkboxes (in groups A, B, C, D, E and so on) based on the value, without necessarily knowing the checkbox group element ID where the value exists.In the end, the data in the array could be spread out across many checkbox groups. Is there a way to use a wildcard to access and populate form elements when you don’t know the iphorm element (or want to use logic to populate them as opposed to hard coding), but know the checkbox value (which in my case is unique).
January 7, 2019 at 7:54 am #28149AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
January 16, 2019 at 4:22 am #28245jerkskiParticipantThank you Ally! Quite helpful!
- AuthorPosts
- You must be logged in to reply to this topic.