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.

Query String for Value instead of Label

  1. begatt
    Member

    Is there a way to pass the Value for a multiple choice field to a page or to a redirect (query string) instead of the Label?

    Posted 13 years ago on Monday August 23, 2010 | Permalink
  2. What version of Gravity Forms are you running? You can find this under Forms > Settings. I'm assuming you are running the 1.4 beta as it introduced the ability to have separate value/label settings on the select fields, but please confirm.

    If you are running the 1.4 beta it outputs the label by default if you just use the field variable. This is because if you are sending notifications to users, etc. to the user you probably want to show the friendly label instead of the value. To get the value you have to tell the variable to output the value. You do this by appending a :value to the end of the variable.

    For example:

    {Name:2:value}

    This only works in 1.4 beta as earlier versions of Gravity Forms did not natively support value/label combinations and only used a label which it also used as the value.

    Posted 13 years ago on Monday August 23, 2010 | Permalink
  3. begatt
    Member

    That worked perfectly! Thank you Carl.

    I am using 1.4.beta4

    Posted 13 years ago on Monday August 23, 2010 | Permalink
  4. gmcalp
    Member

    That worked great for passing data to PayPal, but on the Entries page in the Dashboard the Value is listed instead of the selected data. Any way to fix that?

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  5. The value is the selected data, not the label, which is why it is displayed in the Admin.

    The label is displayed to the user by default so it shows them a user friendly value for that field because you may be storing something like a SKU, etc. as the value. The true value is unimportant to the visitor.

    The admin see's the true value of the field because that is what is actually stored as the value for that field.

    So users see the label and admins see the value. We are probably going to change it so that on the Entries Detail page the Admin will see both values.

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  6. gmcalp
    Member

    Thanks for your reply Carl. Enabling the Admin (or the recipient of the notification email) to see both values and labels (or to be able to select which one to view) would be great.

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink