Hi, @magamatt.
Your code would look something like this:
<?php
function my_custom_info( $translations, $text, $domain ) {
add_action( ‘give_fields_donation_form_after_personal_info’, function( $group ) {
$group->append(
give_field( ‘text’, ‘Cellular’ )
->showInReceipt()
->minLength(2)
->label( ( ‘Numero di cellulare’ ))
->maxLength(30)
->placeholder(‘Inserisci qui il numero di cellulare per facilitare le comunicazioni’)
->storeAsDonorMeta()
->helpText( ( ‘Inserisci qui il numero di cellulare per facilitare le comunicazioni’ ) ) //how this is displayed is up to the template, but if the template has help text displayed, this is how to set it.
);
});
}
/**
* Conditional for gettext.
*
* @param $form_id
*/
function my_give_confirm_form( $form_id ) {
// Change your FORM ID
if ( $form_id == 20023 ) {
add_filter( 'gettext', 'my_custom_info', 10, 3 );
}
}
add_action( 'give_pre_form_output', 'my_give_confirm_form', 10, 1 );
If you need some dev assistance, we encourage you to reach out to our friends at Codeable.io (https://go.givewp.com/codeable). They are WP experts and will surely help you.
Thanks for using GiveWP! Have a great day.