• Resolved c3dscharf

    (@c3dscharf)


    Hello,

    I just started with PlanSo-Forms (v2.5.7) and I want to assign the value of a GET-Parameter in my URL to a field.
    So how do I add the GET-Parameter to the form? I didn’t find any documentation.

    I enabled it in the form options and integrated the form with the shortcut [psfb id=”###” title=”Workshop” Text=”$_GET[‘test’]”]. I added ?test=123 to my URL. I’m afraid it’s not working, even with some variations in quotation marks. The field name is the right one, because the other functions (e.g. CURRENT_DATE()) are working.

    Thanks,
    Diana

    • This topic was modified 8 years ago by c3dscharf.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author PlanSo

    (@planso)

    Hi c3scharf,

    The first step is to activate the option to obay GET and POST values passed to the form in the form’s settings.

    If that option is activated all you need to do is use the field’s name as the get parameter. In you example above I’d suspect it is just “Text” (without the quotes) so that your url will be extended like this “?Text=123”.

    If you don’t know the exact field name, you can go to the admin or user email settings and click the corresponding variable on the right and copy the value without the square brackets ([]) to your url.

    There is no change in the shortcode needed. If you set the shortcode in a way you do it you can prefill field values on a per page basis. In that case a php variable like $_GET[‘something’] is illegal however.

    Hope this helps,
    Cheers

    Thread Starter c3dscharf

    (@c3dscharf)

    Well… sometimes it’s easier than I thought. Works now. Thanks alot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Get-Parameters’ is closed to new replies.