Events Made Easy Forums How do I … Apply Existing Style to Submit Button

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #56163
    Anonymous
    Inactive

    Is there a way to apply an existing style to the submit button on the registration form? I am using Divi, and I’d like the submit button to utilize the theme’s customizable buttons (I’m building out a child theme to utilize and customize across client sites, so I’d rather not have to edit the CSS each time if I can help it).

    #56164
    Franky
    Keymaster

    The button has a name eme_submit_button, that should be used to style it. You can put custom styles in the EME settings (header-setting in tab “other”), or in a custom CSS file in your child theme, see http://www.e-dynamics.be/wordpress/category/documentation/9-changing-the-layout-css/

    #56165
    Anonymous
    Inactive

    Yes – I know how to do that. But I wanted to know if I can add the pre-existing class to the button, because I’m using a theme builder where the styles get customized through that (and it will not apply to the EME style). I don’t want to edit the style on the events button to match every time, when I’m already editing the styles through the builder (we want to limit the amount of CSS we have to edit each time we build a site – that is why we are pre-building these child themes). For the other buttons or links, I’m able to add the theme’s style to them, which then automatically applies the customizer’s style to the element.

    If not, it’s understood. Just was trying to find out if I’m missing a way to do this.

    #56166
    Franky
    Keymaster

    Hi,

    then sorry, but not possible. While I do allow everything to be styled as much as possible, I can’t foresee settings for everything to allow to apply existing styles.
    But, using jquery, you could add an existing style to the submit button, an example: $("#blabla").addClass("myclass");

    #56167
    Anonymous
    Inactive

    Yeah I saw that workaround somewhere, I might try it. No problem at all! I love how customizable this plugin is.

    #58383
    Anonymous
    Inactive

    Franky, thanks for this great cusomizable plugin.
    I am also struggling with the question above and am not able to fix it according to the instructions above.

    Since the page is build up dynamically by the plugin, I have no idea where to put this jquery or javascript text.

    How can I add a class to the RSVP Form Submit button? For example, I’ve also tried adding the following code to page.php, but didn’t do the trick.

    <script type=”text/javascript”>
    var eme_submit_btn = document.getElementByName(“eme_submit_button”);
    eme_submit_btn.classList.add(“bct_btn”);
    </script>

    Thanks in advance for the help.

    #58384
    Anonymous
    Inactive

    Sorry, I have figuered it out. It’s because the Submit button uses Name instead of an ID, which works slightly different. This javascript code in page.php works:

    <script type=”text/javascript”>
    var eme_submit_btn = document.getElementsByName(“eme_submit_button”);
    eme_submit_btn[0].classList.add(“bct_btn”);
    </script>

    #58385
    Franky
    Keymaster

    In jquery it is prettier 🙂
    However: every frontend submit button should already have the class eme_submit_button too, so no need to add an extra class …

    #58386
    Anonymous
    Inactive

    Yes, thanks!

    Like also sarahcamp pointed out, sometimes it’s more usefull to add existing theme classes when you are using a builder…

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top