• Resolved blair08

    (@blair08)


    I tried to use this code but its not changing address label. Any work around?

    /* Get the State field. */
    $field = charitable()->donation_fields()->get_field( ‘address’ );

    /* Change the label to Province. */
    $field->set( ‘label’, ”, ‘Complete Address’ );

    /* Change the field to be required. */
    $field->set( ‘donation_form’, ‘required’, true );

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @blair08,

    For the label, try this:

    $field->set( 'donation_form', 'label', 'Complete Address' );
    

    If that doesn’t work, could you let me know how you are adding this code to your site?

    Cheers,
    Eric

    Thread Starter blair08

    (@blair08)

    Yes Eric, I figured out before your reply. It worked.
    Thank you.

    Cheers,

    Blair

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Address Field’ is closed to new replies.