Automatically select an option

  • Profile Image
    jfullan
    Asked on February 28, 2012 at 03:24 PM

    Hello,

    I was wondering if there was a way to set a field (particularly a payment field) to automatically select an option. We use the Authorize.net integration to collect Application Fees on our college website, and it's happened a number of times that the student will not select the radiobox (marked "Application Fee"), which means payment will not be applied (whether they enter their credit card information or not). This is obviously frustrating for both us and the student, as we have to remind them, and they have to fill out the form again.

    Is there a way to set this field to be automatically selected? Or is there a way to remove the radiobox if there's only one option for payment?

    Thanks! I appreciate your time and help.

     

    God Bless,
    Jesse Fullan
    Webmaster
    Emmaus Bible College

  • Profile Image
    liyam
    Answered on February 29, 2012 at 03:41 AM

    Hello Jesse,

    Can you try editing your page and insert this code at the end of your JotForm script embed source parameter:

    ?paymentInformation=1001

    This is how your script embed code should look like:

    <script type="text/javascript" src="https://www.jotform.com/jsform/20311641054l?paymentInformation=1001"></script>

    Then try and refresh your page this time if it pre-selects the application fee in your form.

    Thanks.

  • Profile Image
    jfullan
    Answered on February 29, 2012 at 10:08 AM

    Hi liyam, thanks so much for the reply. I tried adding that snippet of code at the end of the embed source, so it looked like this (what you indicated):

    <script type="text/javascript" src="https://www.jotform.com/jsform/20311641054l?paymentInformation=1001"></script>

    It didn't work the way I expected. It did select the radiobox, but the payment amount didn't show up in the "total" area. Also, the 1001 showed up in the Name box. Here's a screenshot:

    http://ScrnSht.com/xjocyg

    Any thoughts?

  • Profile Image
    NeilVicente
    Answered on February 29, 2012 at 03:21 PM

    Jesse,

    The scripts that calculate total amount of products selected are only triggered by user actions, i.e., clicking the radio button option. Unfortunately, there is no other way around this, although I have already submitted a ticket to our developers to see if this behavior can be changed.

    Anyway, is it really imperative to show the total amount of the product in your payment form? Seeing that you only have one product (application fee), it would make more sense to permanently display the total price using a free text field.

    Check this sample out to see what I mean:

    http://www.jotform.me/form/20596072151449?paymentInformation[][id]=1001

  • Profile Image
    jfullan
    Answered on February 29, 2012 at 04:53 PM

    Hi NeilVicente, I agree that it isn't imperative that the total amount is shown in the payment form. I can add that as a text above.

    What IS a problem is that if they don't click the radio box (whether the total is set to be displayed or not), then the payment transaction shows up as $0 (and thus does not process). I'm wondering if there's a way to:

    1) automatically have the radiobox selected when the form is accessed

    OR

    2) remove the radio box completely (since there's only one product), so that someone entering their credit card information will automatically be charged the $25 amount (rather than having to select that one product to apply payment).

    Since 1 isn't possible, I'm more wondering about 2.

    Thanks!

  • Profile Image
    Mike_T
    Answered on February 29, 2012 at 07:51 PM

    What IS a problem is that if they don't click the radio box (whether the total is set to be displayed or not), then the payment transaction shows up as $0 (and thus does not process). 

    Have you tried to disable total option, and then use provided workaround with selected Radio Button?

    <script type="text/javascript" src="https://www.jotform.com/jsform/20311641054l?paymentInformation=1001"></script>

    Please give it a try, and let us know if you need any further assistance.

  • Profile Image
    NeilVicente
    Answered on February 29, 2012 at 11:08 PM

    @jfullan

    Did you check out the URL I gave you? Did you notice that the radio option was preselected?

    Actually, no offense to my colleagues, but the more accurate URL parameter to preselect the radio option (without having 1001 in the Name field) is this:

    ?paymentInformation[][id]=1001

    So your embed code should be:

    <script type="text/javascript" src="https://www.jotform.com/jsform/20311641054?paymentInformation[][id]=1001"></script>

  • Profile Image
    jfullan
    Answered on March 01, 2012 at 11:02 AM

    The problem is resolved! That script worked.

    Thanks so much for your help!

    God bless,
    Jesse Fullan