PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Prepopulate with encoded url doesn't work

  1. tcs
    Member

    Hi

    I have a form on my page and I want to prepopulate some fields.
    It seems I can pass data via url only if they are unencoded.

    For example
    mysite.com/form?status=new&class_day=Monday works ok

    mysite.com/form?status%3Dnew%26class_day%3DMonday does not pre-populate fields

    I need to encode because many of my actual forms need some values prepopulated containing spaces etc.

    Also I would really like to be able to disable these prepopulated fields so the user can still see them but not change them. Is this easily achieved. I know there is an admin only option which can completely hide the field but I'm looking for an option that still displays it (disabled) to the user.

    Thanks

    Posted 8 years ago on Thursday January 26, 2012 | Permalink
  2. tcs
    Member

    Update.
    Encoded urls do work - was doing something incorrectly and now using http_build_query is working fine. (query built using regular ampersand as using amp; not successful for all browsers).

    To the second part of my post - I would still like to know how to go about disabling pre-populated fields so the user cannot edit them (but still see them) if anyone knows.
    Thanks

    Posted 8 years ago on Saturday February 4, 2012 | Permalink