• Resolved monounlimited

    (@monounlimited)


    Hi,

    You posted this advice on a previous resolved question, about how to conditionally show a submit button on a form.

    This works fine for me. However, when I include the submit button in this way, the redirect URL doesn’t work.

    Is there any way to edit this code:
    jQuery(this.form).submit();

    to include a redirect URL?

    Thank you!

    If you want show a submit button when a checkbox or radio button is checked, the process is very straightforward:

    – Select the “No” option for the attribute: “Display submit button?” in the form’s settings.

    – Insert a button in the form, and convert it in a submit button entering as its onclick event, the piece of code:

    jQuery(this.form).submit();
    – Select the radio button or checkbox field in the form, and then, click on the link: “Show dependencies” in its settings (specifically in the choices section)

    – And finally, select the button field from the list of dependent fields corresponding to the choice.

    Best regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @monounlimited

    A submit button is not a redirect page button. If you want to redirect the user to a different page, you should enter as the onclick event of the button a piece of code similar to:

    
    redirectToURL('https://cff.dwbooster.com');
    

    Best regards.

    Thread Starter monounlimited

    (@monounlimited)

    Thank you,

    However, I’m not sure that you understand what I’m wanting to do.

    I can’t use the normal Submit button (‘Display submit button’) as this displays the submit button on the form regardless of what people enter in the form. I only want the submit button to display once people have navigated their way through the full form and completed specific questions with specific answers. Therefore it should display only after the final question has been completed.

    To set this up, I was using your advice to include a submit button with the code jQuery(this.form).submit(); and making that button dependent on the last question being answered in a certain way.

    This works fine to submit the form. However, it does not work in terms of then sending the person to the designated ‘Thank you page (after sending the message)’ – it just hangs on the current page URL (which becomes blank).

    Does that make sense?

    So I’m wanting to:

    1. Conditionally hide/display the submit button
    2. Then when the form is successfully submitted, have the page redirect to a designated thank you page.

    Thanks,
    Monique

    Plugin Author codepeople

    (@codepeople)

    Hello @monounlimited

    Sorry, I didn’t understand your question. Could you send me the link to your form and thank you page, please?

    Best regards.

    Thread Starter monounlimited

    (@monounlimited)

    Thread Starter monounlimited

    (@monounlimited)

    Plugin Author codepeople

    (@codepeople)

    Hello @monounlimited

    That seems the URL to the thank you page in the form’s settings is empty. If it is the case, it is required you enter the URL to the thank you page through the “Thank you page” attribute in the form’s settings.

    For pro or commercial product support please contact us directly on our site.

    Commercial products are not supported in these forums. We will happily answer this and any other questions you can have on our own site.

    Thank you.

    Thread Starter monounlimited

    (@monounlimited)

    No it’s not empty.

    In the field marked ‘Thank you page (after sending the message)’ this is included:
    http://www.templehillsmedical.com.au/confirm-vaccine-consent

    I’ve tried to do a screengrab of it for you but I can’t work out how to attach it to this message.

    I did have some customisations done on the CCF some years ago (using the pro version), and I wonder whether this is getting in the way. How do I contact you regarding this?

    Thread Starter monounlimited

    (@monounlimited)

    PS. I have re-submitted this enquiry through your Contact form on your CFF website.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Conditionally display submit button, then redirect form when submitted’ is closed to new replies.