I'm having some problems with my Gravity Forms form. It's a multi page form, and I need to populate a field on page 2 using post values from page 1. But it's not working. Of course the field on page 2 is configured to "Allow field to be populated dynamically" and the field's parameter is set to "name". Here's my code:
$name = $_POST['input_2'] . ' ' . ( ! empty( $_POST['input_3'] ) ? ( $_POST['input_3'] . ' ' ) : NULL ) . $_POST['input_1'];
When I print the value of
$name variable using
var_dump($name); it's actually correct.
If I change the
$name = 'Last Middle First'; it's populating the field as it should.
Thank you for your help.