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.

Change the label from "street address" to "Po Box" but only on second field

  1. Andrew Munro
    Member

    I have 2 address fields in my form.

    I would like to change "street address" to "Po Box" on the second field. I know there's the gform_address_street filter, but this changes both of them. How can I change the label only for the second field, if that field has an ID of 17 ?

    Posted 6 years ago on Tuesday June 11, 2013 | Permalink
  2. Richard Vav
    Administrator

    Hi Andrew,

    You could accomplish this using some jQuery by targeting the label id like so

    <script>
    jQuery(document).ready(function($) {
    $("#input_6_17_1_label").html("PO Box");
    });
    </script>

    6 is the form id, 17 your field id, 1 is the input id

    Regards,
    Richard

    Posted 6 years ago on Tuesday June 11, 2013 | Permalink
  3. Andrew Munro
    Member

    Thanks but I'd prefer doing this using filters if possible

    Posted 6 years ago on Tuesday June 11, 2013 | Permalink