add custom field “tax id code”
-
I added the custom field “CodiceFiscal” in the donation form by modifying the functions.php file with the following code
function wpsites_no_posts_text() {
echo '<span class="sorry-no-posts"></span>';
echo '<p class="no-posts"></p>';
}
add_action( 'give_fields_donation_form_register_login_fields', function( $group ) {
$group->append(
give_field( 'text', 'CodiceFiscale' )
->showInReceipt()
->minLength(16)
->label( __( 'Codice Fiscale' ))
->maxLength(16)
->placeholder('Codice Fiscale')
->storeAsDonorMeta()
->required() // Could instead be marked as readOnly() (optional)
->helpText( __( 'Inserisci il tuo Codice Fiscale' ) ) //how this is displayed is up to the template, but if the template has help text displayed, this is how to set it.
);
});However, I am unable (or do not understand how) to show the contents of the added field (Fiscal Code) in the donation details in the back office
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘add custom field “tax id code”’ is closed to new replies.