• Resolved corum999

    (@corum999)


    Hi, I have 2 forms that have a mix of text fields and some radio buttons. Once the user fills out form #1 I redirect them to form #2, and the redirect URL contains URL parameters to be passed to the second form. I am able to populate the form #2 destination text fields by using {get:URL_parameter_name} in the field’s “default” config value.

    My problem is that I can’t figure out how to also pass a value in a URL parameter that will pick a choice in a radio element or dropdown.

    Has anyone done this with Caldera Forms?

    https://wordpress.org/plugins/caldera-forms/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Josh Pollock

    (@shelob9)

    This is what passback variables are used for. If you add one, whose value is that field, then it will be added to the query string on redirect.

    Thread Starter corum999

    (@corum999)

    Hi Josh,
    thanks for the tip. I was building the redirect URL with my variables in a redirect processor but based on this approach are you saying that I don’t have to do any of that?

    Plugin Author Josh Pollock

    (@shelob9)

    Passback variables are added to the redirect URL.

    Thread Starter corum999

    (@corum999)

    Hi Josh,
    I guess my main question still is how do you include a variable in a URL that will drive the selection of a radio button on a form? I can add the variable to the URL ok but can’t figure out how to get that variable (i.e. “1”) to have the radio button choice get selected on the 2nd form.

    Plugin Author Josh Pollock

    (@shelob9)

    If you have a URL variable called “foo” then in your radio field, in its default value field, use {get:foo}.

    Thread Starter corum999

    (@corum999)

    Is there a default value field for a Radio Button element like there is for a Single Line Text element? I think Dropdown Select elements have the same situation.

    For example, I have a radio button with 2 options, “1” & “2”. I need to have the URL variable select “2” in the radio button element when the page loads. I can have the URL contain: http://www.test.com/form2?radiobutton=2&foo=hello

    I have it working great using {get:foo} for my Single Line Text elements. Where do I put {get:radiobutton}?

    Plugin Contributor David Cramer

    (@desertsnowman)

    sorry to come late on this. There actually isn’t a way to do this just yet. especially on the radio and checkboxes. The only way I can think is to add a filter on the get field before render and then set the value depending.

    I’ll look at working on a tutorial for overriding values to fields and be sure to include this.

    but for now, please consider this option not supported just yet.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How can I populate a radio element choice via URL parameter’ is closed to new replies.