Support » Plugin: Fast Secure Contact Form » Preselect subject in drop down: subject ID as query string param doesn't work

  • Resolved Frisko


    Hi folks! The contact form on a client site has multiple subjects in a drop down list and I want to preselect one subject depending on where the user is comming from.

    Reading the “How To: Passing query string parameters to contact form page” this should be possible by simply passing [form number]subject_id=[number] as param. So my Link is something like blogurl.tld/contact/?1subject_id=1 (or 2,3,…).

    Unfortunately this doesn’t work…the first option is always selected no matter what I pass as ID in the query string!
    So I went into the code and I think I found the reason: The select is build in si-contact-form-display.php on line 373-411. On line 394 there is an if-clause which checks if the subject ID (sid) is set. If it’s not set and if we set the subject id in the query param the sid is extracted from the url. The thing is: sid is always set, because it is assigned ‘1’ as default on line 1016 in si-contact-form.php. That’s why the first option is always selected and the query string param doesn’t work for subject drop down list…

    You could unset the sid before the if-clause on line 394. That would make it work. Can someone confirm this? Is unsetting a solid solution?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Challis


    I will fix it properly. I will let you know when the fix is ready.


    Plugin Author Mike Challis


    The download was fixed.
    If want this fix now, and the latest download version is still, manual upgrade will fix it

    Let me know if it resolves the problem

    Yes, the fix you provided resolves the problem!

    Thank you so much Mike. Great work! 🙂



    i was glad to see, that the searched case i like to ask for a solution has been discussed one times before here. (sorry for my bad english)

    i tried to fix a problem for my needs like in the example above, but it won’t work:

    ok, for explanation:
    “The contact form on” my site has in a 3. “extra field” “multiple subjects in a drop down list and I want to preselect” the 7 subject “depending on where the user is coming from”.

    if i do write now for the just wanted url like this


    … but it will never show the in the seventh point of the drop down list written subject but always the first one.

    it seems i’m not able to choose the right way of URL Encoding.
    what should i write for this please?

    (using Fast Secure Contact Form Version on WP 3.5.1 / Multisite)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Preselect subject in drop down: subject ID as query string param doesn't work’ is closed to new replies.