• Resolved a4jp

    (@a4jpcom)


    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(); ?>

Viewing 15 replies - 1 through 15 (of 28 total)
  • Hi @a4jpcom,

    Currently, we don’t have the feature field properties of the checkbox field. I’ve made a note of the feature request and we’ll keep it on our radar to be reviewed as we plan out our roadmap for the future.

    In case it helps, you can use the filter wpforms_field_properties_checkbox to modify the field properties.

    Kindly,

    Hi @a4jpcom,

    We haven’t heard back from you in about a week, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

    Thread Starter a4jp

    (@a4jpcom)

    Please keep it open. Sorry for the late reply. I was working on my client’s site.

    Thread Starter a4jp

    (@a4jpcom)

    As far as I can see, there isn’t any info on your site about using wpforms_field_properties_checkbox. Any there is only one result in Google. Do you have a page hidden somewhere explaining how to use this?

    Hi @a4jpcom — thank you for your patience here!

    The filter is not yet documented but it can be used to pass a custom array of field properties including the class that you want to define.

    You can check how this works by checking the class-checkbox.php on this path: wp-content\plugins\wpforms\includes\fields from line 15

    Hope this helps! ??

    • This reply was modified 2 years, 5 months ago by Nik Sebastian.
    Thread Starter a4jp

    (@a4jpcom)

    Can the category IDs be added to the dynamic checkboxes please? I don’t have that file or a sample to edit and test code on. It should be super easy to just add the classes to each checkbox on your side though.

    Thread Starter a4jp

    (@a4jpcom)

    I found a client using your plugin and they sent me the file so I could fixed it.

    If you just add $value from your code to the class area people can reference the actual categories listed and style each dynamic checkbox or label. Please include this tiny update to your plugin.

    wpforms/includes/fields/class-checkbox.php > Line 160:

    'class' => array( "choice-{$key}", "depth-{$depth}", "cat-".$value ),

    Without this referencing update, people will keep having to update their CSS every time they add new categories if they are trying to style individual or important checkboxes.

    The labels can then be referenced like this li.cat-777 label{CSS here};

    Thank you for saying where the code roughly was it saved a heap of time.

    ———————

    Also if it’s okay can you write more about wpforms_field_properties_checkbox somewhere?

    If you shared actual code samples on the WordPress site here as well as your site, more people will learn about your plugin and be able to help improve the plugin. You will also get a double advertisement for your plugin. One from the WordPress site and the other from your site.

    I’m sure WordPress also has a rule saying we can’t send people from the support area to our website to just get more clicks. Lots of plugins got removed from the repository before for trying this type of thing.

    Hope I can help with more time to time now I know dynamic checkboxes can be referenced properly after this update.

    Any plans on selling perpetual licenses instead of just having monthly or yearly licences later on as well?

    • This reply was modified 2 years, 4 months ago by a4jp.
    • This reply was modified 2 years, 4 months ago by a4jp.

    Hi @a4jpcom,

    Thank you for your patience here! We have passed on the feedback to development and it will be considered for future to have more details on wpforms_field_properties_checkbox

    Also, currently, all our licenses are annual subscription based.

    Hope this helps!

    Thread Starter a4jp

    (@a4jpcom)

    Without the class “cat-“.$value update I don’t think I can use this plugin as it will just cause heaps of problems when the client updates their site. I hope your team can make the change soon.

    By setting checkbox ids as just a position in a list you have also made it difficult to reference the checkboxes.

    For example:

    if(document.getElementById("wpforms-777-field_11_386") != null){
    		// you code if checkbox exist
    		document.getElementById("wpforms-777-field_11_386").checked = true;
    	}

    Everytime a new category is added this code selects the wrong box. Please use the category ID instead of position. The class should have both the ID and position for referencing.

    All categories are automatically given individual IDs which means they are better for referencing.

    • This reply was modified 2 years, 4 months ago by a4jp.

    Hi @a4jpcom – We completely understand what you have mentioned here ??

    Your valuable suggestion is noted and passed on to the team! I apologize as we can’t provide any ETA when it will be added coz many factors are being considered when adding a new features on the plugin.

    If you have any other questions, please feel free to ask.

    Thank you for understanding!

    Thread Starter a4jp

    (@a4jpcom)

    I can’t understand why the problem won’t get fixed if you have all the code.

    Thread Starter a4jp

    (@a4jpcom)

    Is the plugin getting updates again soon?

    • This reply was modified 2 years, 2 months ago by a4jp.
    Plugin Support Kenneth Macharia

    (@kmacharia)

    Hi @a4jpcom

    Thank you for your follow-up.

    Sorry, we don’t yet have any news about this issue. We’ll share an update as soon as we receive word from our development team.

    Thank you for your patience.

    Thread Starter a4jp

    (@a4jpcom)

    Can you please update the checkboxes? I also found a new really big problem with the WPForms dynamic checkboxes. You have no support for sorting kanji in standard aeiou order. You need to change the sort so it is by slug to fix this. This makes the plugin unusable for lots sites. Hope you can fix it. The current JIS order for kanji is almost random.

    Hey @a4jpcom – Thanks for sharing the details, and I’ve shared this with our development team. I’ll be sure to circle back when an update is released.

    In the meantime, please feel free to reach out if you have any suggestions or questions.

    Kindly,

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Can you add CSS page IDs to the dynamic checkboxes please?’ is closed to new replies.