Concantenate Two Fields into a 3rd field [RESOLVED]

Using Gravity Forms 2.6.7.

I have 2 fields, one is a drop down field for Salutation (which I would use prefix but need the drop down to force choices) and then have the Name field (first,last,suffix). I need to combine the 2 fields but rgpost is only pulling in the Salutation which is input_118. I’ve spent hours searching and it appears that a lot of suggestions are purchasing yet another plugin to do this. This is a simple form with only 6 fields. Is there any reason the below won’t work?

add_action( ‘gform_pre_submission’, ‘pre_submission_handler’ );
function pre_submission_handler( $form ) {
$_POST[‘input_79’] = rgpost( ‘input_118’) . rgpost( ‘input_26’);
}

p.s. - I also tried to do the live merge on a hidden field, which pulls nothing in at all.

The Name field Prefix input is a drop down, and you can customize the input label and values for it from the field settings. So I wonder why you don’t want to use the Name field built-in Prefix?

Maybe I didn’t understand this. You mean you want to require the Prefix to be selected ? If so, you can use the gform_field_validation filter to force the user to select a Prefix, there’s an example in the filter documentation: https://docs.gravityforms.com/gform_field_validation/#h-4-name-field-validation

Well, I had no idea it was a dropdown! You saved my sanity at least. It is certainly hidden that it is.

Actually I was trying to merge two fields into another field, which doesn’t appear to work anyway but I didn’t know that the prefix was a drop down and all the fields will be required so I am set! Yay!

Great! :tada::confetti_ball::sparkler: