PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Bug in Address form field

  1. I am using gravity forms and using my own styles to make the forms fit my site. In doing so I found the following bug in the Address block for a form.

    When you include an address block in the form, GF plugin drops in the following code for the city field of the form (specifically the label field)

    <label for='input_1_4_3' id='input_1_4.3_label'>City</label>

    Unlike the other fields the id has a period rather than an underscore. When using CSS to style entries this creates a problem.

    The bug is in common.php in the use of a sprintf statement (line 2723 in my release) as shown below -

    $city = sprintf("<span class='ginput_{$city_location}$class_suffix' id='" . $field_id . "_3_container'><input type='text' name='input_%d.3' id='%s_3' value='%s' $tabindex %s/><label for='%s_3' id='$field_id.3_label'>" . apply_filters("gform_address_city_{$form_id}", apply_filters("gform_address_city",__("City", "gravityforms"), $form_id), $form_id) . "</label></span>", $id, $field_id, $city_value, $disabled_text, $field_id);

    The recommend change is :

    $city = sprintf("<span class='ginput_{$city_location}$class_suffix' id='" . $field_id . "_3_container'><input type='text' name='input_%d.3' id='%s_3' value='%s' $tabindex %s/><label for='%s_3' id='" . $field_id . "_3_label'>" . apply_filters("gform_address_city_{$form_id}", apply_filters("gform_address_city",__("City", "gravityforms"), $form_id), $form_id) . "</label></span>", $id, $field_id, $city_value, $disabled_text, $field_id);

    Hope this helps everyone

    Loren

    Posted 7 years ago on Wednesday April 11, 2012 | Permalink
  2. Thanks! We'll take a look and get this corrected in the next release.

    Posted 7 years ago on Wednesday April 11, 2012 | Permalink

This topic has been resolved and has been closed to new replies.