Hi, I created a gform_pre_submission_filter in which I need to access to the field labels. For example I have the following line:
if ($_POST['input_13'] == 'Yes') {
$q1docs = $q1docs.'--'.$form['fields'][7]['label'];
}
This works as expected. But my form is several pages and it is difficult to determine the proper index (i.e. the 7 in $form['fields'][7]['label']) for fields further along in the form.
I do know the Field ID, but unfortunately the index does not correlate to the field ID. For example the Field ID of $form['fields'][7] is 4, not 7.
Is there a way to get the label programatically without knowing the index of that field?
Thanks!