Can you add CSS page IDs to the dynamic checkboxes please?
-
I want to use WPForms on a clients website but can you add CSS page IDs to the dynamic list of checkboxes first? Paid version as well as free if the checkboxes are included. It is a simple update and would reduce the amount of coding that needs to be done on my side when making websites.
I see on many sites using WPForms they only have a relative position. For example,
<div id="wpforms-777-field_24-container" class="wpforms-field wpforms-field-checkbox wpforms-list-inline" data-field-id="24"> <label class="wpforms-field-label" for="wpforms-777-field_24">Catagory: </label> <ul id="wpforms-777-field_24"> <li class="choice-0 depth-1"> <input type="checkbox" id="wpforms-777-field_24_0" name="wpforms[fields][24][]" value="272"> <label class="wpforms-field-label-inline" for="wpforms-777-field_24_0"> October</label> </li> <li class="choice-1 depth-1"> <input type="checkbox" id="wpforms-777-field_24_1" name="wpforms[fields][24][]" value="273"> <label class="wpforms-field-label-inline" for="wpforms-777-field_24_1"> Oh no</label> </li> <li class="choice-2 depth-1"> <input type="checkbox" id="wpforms-777-field_24_2" name="wpforms[fields][24][]" value="274"> <label class="wpforms-field-label-inline" for="wpforms-777-field_24_2"> Orange</label> </li>
If I want to use CSS to highlight a label it’s gonna move each time if it is just connected to the position.
Can you add the page ID to the LI so we can easily change setting without having to constantly update CSS selectors please?
For example: <li class=”choice-2 depth-1″> -> <li class=”choice-2 depth-1 tag-link-265″>
Just now, every time we add a new category a dynamic list it moves items and the CSS selector has to be updated almost everything every time depending on the position. If you have the ID as part of the referenceable code for each checkbox then this would never be a problem.
You only need to add code like this
<?php echo get_the_ID(); ?>
the the CSS class. Or some thing like this<?php echo "tag-link-" . get_the_ID(); ?>
- The topic ‘Can you add CSS page IDs to the dynamic checkboxes please?’ is closed to new replies.