• Resolved simonetat

    (@simonetat)


    hello,
    i’m just trying to use iubenda privacy policy on your registration form, but i cant autodetect.
    is there a way to add data-cons- attr to the field of the form?
    thanx
    simone

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @simonetat

    You can use this UM filter hook to add attributes to the form fields:
    + um_field_extra_atts
    – $field_atts,
    – $key,
    – $dat

    Example code that adds attribute “data-profile_photo” for the “register_profile_photo” field:

    function um_register_display_profile_photo_in_account( $field_atts, $key, $data ) {
    
    	if ( 'register_profile_photo' == $key ) {
    
    		$field_atts['data-profile_photo'] = "HTTP://example.com/profile.jpeg;
    	}
    
    	return $field_atts;
    }
    add_filter( 'um_field_extra_atts', 'um_register_display_profile_photo_in_account', 10, 3 );
    

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @simonetat

    …Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help… ??

    Regards,

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