Support

Home Forums Event Espresso Premium Registration Form – Checkbox Question

Registration Form – Checkbox Question

Posted: May 27, 2024 at 2:27 pm


pathwise

May 27, 2024 at 2:27 pm

Hello!

I noticed when I add a description to a checkbox question in the registration form, it populates a hyphen. https://snipboard.io/v9wBi0.jpg Any way I can remove this hyphen?

Thank you. ๐Ÿ™‚


Rio

  • Support Staff

May 28, 2024 at 12:34 am

Iโ€™m sorry, but thereโ€™s no filter available to remove that.

the option i can suggest is to put it as value and not description. But since you have html tag in it, you need to put it in description.

But will bring this to our tEEm for discussion and if its possible to be customized.

thanks.


pathwise

May 28, 2024 at 7:15 am

Thanks for the response Rio!
Yes, exactly, that is why we have it in the description for the HTML. ๐Ÿ™‚


Rio

  • Support Staff

May 28, 2024 at 8:02 pm

Does this option works for you? https://monosnap.com/file/tkxdTMNUwxY0HpKGagEktWknEF1XM4

Then have it styled by targeting the element
https://monosnap.com/file/kqzAxXCW9t81lEf3LWZTK35v5EUro5

you may also try to modify the code here.
This is for setting the checkbox to check by default.
https://gist.github.com/Pebblo/e67cc5f8fae20e5ae08380f43f5c3b93

Then just create JS/jquery script to replace the hyphen.

function ee_set_checkboxes() {
wp_add_inline_script(
'single_page_checkout',
'jQuery( document ).ready(function($) {
const mydata = document.querySelector(".ee-checkbox-label-after:nth-child(4)");
mydata.children[0].nextSibling.data="Hello"
});'
);
}
add_action( 'wp_enqueue_scripts', 'ee_set_checkboxes', 11 );

in any case you create custom code, follow this article
https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

thanks

thanks


pathwise

June 6, 2024 at 8:41 am

Thanks for this, Rio. ๐Ÿ™‚
I don’t think this quite achieves what we want but I will keep this for reference. We will live with the hyphen.


Rio

  • Support Staff

June 6, 2024 at 6:27 pm

Thank you. Have a wonderful day.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso