Populate label from a condition of a value of an another field

I need help,
The objective is to change the label of a field according to the value of a field in the form.

But Merges tags (@{:7}) show nothing (but the condition working) (i have Gravity Perks/Wiz)


add_filter( 'gform_pre_render', 'change_field_label' );
function change_field_label( $form ) {
  $form_id = 1;
  $field_id_to_change = 62;
  $field_id_to_check = 4;

  $value_to_check = "Value1";

  if ( $form['id'] == $form_id ) {
    foreach ( $form['fields'] as &$field ) {
      if ( $field['id'] == $field_id_to_change && rgar( $form['fields'][$field_id_to_check], 'value' ) == $value_to_check ) {
        $field['label'] = '@{:21}, @{:7} : ';
        $field['label'] = '@{:7} : ';
  return $form;

It’s not possible to insert Live Merge tags directly within the codes. Live Merge tags are inserted on the form fields. If I understand what you’re trying to do correctly, you’ll have to change the code and maybe use some javascript. In other to assist you with the correct solution, I have a question. Will the label be populated only when the form loads, or will it be dynamically populated based on the value entered or selected in the field with ID 4?

You mentioned you have Gravity Perks. Can you please get in touch with us via our support form so that we can look at the setup and assist you with the solution to get the Live Merge tag working on the label for your use case? You can send the answer to the question above via the support ticket. We’ll be looking forward to your ticket at Gravity Wiz.


It will be populated dynamically according to the value entered or selected in the field with ID 4.

It is a form with several pages.