Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Frederik T 242 posts 373 karma points
    Oct 14, 2011 @ 12:24
    Frederik T
    0

    Creating a form in xslt, changing the submit action depending on user input

    I hope this is simple:

    I am creating a multi step form, and yes i have contour but i have to create this by hand because contour does not have functionality that i need for this.

    In this multi stop form, a user can choose some values from a radiobutton, and depending on what button the user selects, a different form is presented.

    Its a relativly simple form:

    Step 1
    Step 2A
    Step 2B
    End (a "thank you for submitting" page)

    The user selects a number between 0 and 1, if its for example above 5 then form A is the next form, if its below 5 then its form B. Both end at the same "thank you" page.

    Also somewhere in the end, the data has to be submitted to a database. But that is for later, first is getting the form to work.

    Does anyone have any suggestions? Any help would be appreciated.

  • Rodion Novoselov 694 posts 859 karma points
    Oct 14, 2011 @ 12:36
    Rodion Novoselov
    0

    Hi, Frederik. Is it possible merely to use some client Javascript for it?

    As for me it could be rather simpler. E.g.:

    $(function() {
    $('input[name="myradiobtns"]').change(function() {
    if($(this).attr('checked')) {
    $('form').attr('action', $(this).val());
    }
    });
    }); 
Please Sign in or register to post replies

Write your reply to:

Draft