• Resolved Chuckie

    (@ajtruckle)


    I want to provide a hyperlink in my documentation that takes the user for my contact form but also:

    Sets the Subject field to a certain text string.
    Sets the Message to a certain value.
    Selects certain choice in one of the drop downs.

    Can we pass such values via the URL?

    Andrew

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter Chuckie

    (@ajtruckle)

    Thanks, so for something like these:

    [text* your-subject size:100 placeholder "Your subject here"]
    [textarea* your-message placeholder "Your comment or message here"]

    I can change to:

    [text* your-subject size:100 placeholder default:get "Your subject here"]
    [textarea* your-message placeholder default:get "Your comment or message here"]

    And then on the URL:

    ..../?your-subject=xyz&your-message=abc

    Correct?

    What about these though:

    [select* menuApplication first_as_label "Select the software application" "Public Talks (General Enquiry)" "Meeting Schedule Assistant (General Enquiry)" "Meeting Schedule Assistant (Assignments Editor Enquiry)" "Meeting Schedule Assistant (Midweek Meeting Editor Enquiry)" "Visits Rota (General Enquiry)"]

    What value do we pass with the URL to select:

    Meeting Schedule Assistant (Midweek Meeting Editor Enquiry)

    from the drop-list?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Yes, correct. For a drop-down menu item, in the same way, add default:get as an option in the form-tag. Then, add the value for the field like this:

    .../?menuApplication=Meeting+Schedule+Assistant+(Midweek+Meeting+Editor+Enquiry)

    Replace a space with ‘+’. This is because urlencode() is applied here.

    Thread Starter Chuckie

    (@ajtruckle)

    Great! One last question. Is using these URL parameters going to potentially expose me to extra spamming?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I don’t think so. It is just giving a default value. Clicking on a Submit button has to be done by a human hand.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Displaying a form with certain combo selected’ is closed to new replies.