WordPress.org

Ready to get started?Download WordPress

Forums

Fast Secure Contact Form
[resolved] Passing querystring parameters to contact form page (15 posts)

  1. PatJ
    Member
    Posted 3 years ago #

    Si contact form works brilliantly on my sites but I'd like to now extend it.
    On another page I have a list of tasks and dates and a link button enabling a logged in user to volunteer for that task on that date by emailing the co-ordinator. Currently the link is http://...../?page_id=381 to the page containing [si-contact-form form='3'].
    The source page is a home-written plugin so the php is readily modifiable.
    On form 3 I have two additional fields set for date and a drop-down for task and I would like to pass the date and task from my page in the querystring (or otherwise) to populate these fields or at least pass a text message to pre-populate the message field with 'I will do x on y'. The logged-in user can then fill in the rest and send the form.
    Can it be done and how please?

    http://wordpress.org/extend/plugins/si-contact-form/

  2. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    This is on the feature list for a future version. It maybe done soon, but I can make no promise on when. I just do this as a hobby in my spare time. Donations can help me afford more time.

  3. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    Hey good news I am working on it. :)
    It will work on any field type except attachment.

  4. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    Done. This modification with FAQ page took approx 8 hours. If everybody who uses it just donated a few $$ I would appreciate it. Thanks - Mike Challis

    See FAQ for usage instructions for query strings.
    Tip: Passing query string parameters to contact form page
    http://www.fastsecurecontactform.com/query-string-parameters

  5. PatJ
    Member
    Posted 3 years ago #

    Wow - thank you. Looks great - I'll test it shortly.
    My two WordPress sites are for clubs, so also a spare time hobby (day job is asp.net and sql server) but I shall talk nicely to the Treasurer about a donation as your Fast Secure Contact Form is proving a great benefit to both.
    Thanks so much.

  6. stevendude
    Member
    Posted 3 years ago #

    Using plus signs for spaces to pass field info in the URL:

    This works for me in Firefox but IE gives me a 404 not found. Any ideas?

    Example: http://obsessed-with-music.com/wp/contests?2subject=NOW36+or+NOW90s

    Thanks.

  7. stevendude
    Member
    Posted 3 years ago #

    Ooops, figured out my problem but thanks...

  8. PatJ
    Member
    Posted 3 years ago #

    It works brilliantly. Thank you.

  9. Jim
    Member
    Posted 3 years ago #

    On a similar note, would anyone know if its possible to pre-fill a form using a logged in user's info without passing in a query string? I'm able to pass data via the query string but I'm hoping to be able to load personal info (address, etc) without having to pass via a query string...

    Awesome plugin!

    Thanks!

    Jim

  10. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    Jim, the form will insert a logged in users name and email address, but that is all. Any other form fields would be extra form fields and those are all optional, so I would have no way of knowing where to load personal info (address, etc).

  11. Tosh
    Member
    Posted 3 years ago #

    edit nevermind, lol.

  12. kja03
    Member
    Posted 2 years ago #

    I'm trying to send query data from a contact form to a site that requires '%20' for spaces and not plus signs. How can I change this?

  13. Mike Challis
    Member
    Plugin Author

    Posted 2 years ago #

    kja03,

    in the file si-contact-form.php
    look for line 519:

    if($return == 'array')
          return $posted_data_export;
        else
          return $query_string;

    right before it, add this line:
    $query_string = str_replace('+','%20',$query_string);

  14. ryznart
    Member
    Posted 2 years ago #

    I'd like to prefill the extra fields using php variables or custom fields instead of querystring. Is it possible?

  15. Alexof
    Member
    Posted 2 years ago #

    Excellent plugin!

    Just downloaded it and playing with it to see if it really meets my needs! So far its perfect, however i have a question.

    For the redirect URL i am getting the following:
    http://myweb.mycompany.com/thanks/?from_name=My+Name#038;from_email=myemail%40gmail.com&ex_field1=5&ex_field2=NameHere&ex_field3=98764&

    I am trying to create a page to grab the URL via GET and put the data on the screen for the user, however when i use the $_GET['var'] in PHP i am only able to output the "from_name" variable. The rest just break.

    Is it posible to make the URL redirect with & and not do the encoding at all? If not how do i transform the URL so i can read it with GET

    Thanks in advance!
    Alex

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic