PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, August 26, 2022

[FIXED] How to pass Dropdown choice values in Gravity Forms redirect

 August 26, 2022     gravity-forms-plugin, gravityforms, wordpress     No comments   

Issue

I'm passing parameters from a Gravity Form to another page using a Confirmation of type Redirect.

Currently the Label of the dropdown choice gets passed, but I want to pass the Value instead. Does anyone know of a way of doing this?

My query string looks like this...

choice={Dropdown Field Name:6}

... which outputs a redirects URL like this...

https://example.com/result_page?choice=First+Choice

... but ideally it should look like this...

https://example.com/result_page?choice=1

Any ideas?

BTW I have obviously have the "show values" setting turned on for the Dropdown in GF, and numerical values set for each choice.


Solution

By default, merge tags for choice-based fields return the label but you can request the value with the :value modifier:

{Dropdown Field Name:6:value}

More details and other modifiers are available in the Gravity Forms docs.



Answered By - Dave from Gravity Wiz
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing