Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

75
Views
Javascript to hide a Formidable Forms button upon visibility of a DIV element with a specific class

I have a multi-step form built in Formidable Forms which uses the 'conversational forms' addon. I want to hide the 'continue' button on particular steps on my form, for example; Step 2 and Step 4 of my form. Step 2 and Step 4 are identified with a DIV class.

For example: Step 2:

<div class="frm_form_fields  frm_page_num_2">

For example: Step 4:

<div class="frm_form_fields  frm_page_num_4">

The 'continue button' is outside of the DIV class 'frm_page_num_2' and 'frm_page_num_4', so i cannot hide it with CSS.

This is the html for my continue button:

<div class="frm_continue_chat_wrapper frm_submit">
<button class="button button-primary frm-button-primary frm_continue_chat frm_button_submit"><span class="frm_continue_text">Continue</span><span class="frm_continue_final_text">Get Quote</span></button>
</div>

I want to hide the continue button only when the DIV class containing 'frm_page_num_2' or 'frm_page_num_4' are visible. Is this possible with some form of Javascript?

Thanks

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs