Hi,
You may want to take a look at the following knowledge base article which should help answer your question:
https://yikesplugins.com/support/knowledge-base/how-do-i-change-the-field-labels/
In short, the field labels can be altered within MailChimp itself.
Thanks,
Evan
Thread Starter
nae
(@nae)
Thank you for the answer, very quick. I knew that way of doing it but i need to create several forms in different language.
I think i’ll use description field, trying to put it above instead of under the empty field.
The other option is to use one of the built in filters to filter the field label of a specific form field based on the form ID, yikes-mailchimp-MERGE_VAR-label.
The following example will change the form e-mail field based on the form ID, and would need to be added to the functions.php file of your active theme.
function alter_form_email_field_labels( $label, $form_id ) {
if( 1 == $form_id ) { // Spanish
$label = 'Correo Electrónico';
}
if( 2 == $form_id ) { // Chinese
$label = '電子郵件';
}
if( 3 == $form_id ) { // Russian
$label = 'Эл. адрес';
}
return $label;
}
add_filter( 'yikes-mailchimp-EMAIL-label', 'alter_form_email_field_labels' );
There is a filter for each form field, and depends on the merge variable for each field. If you had a first name field with the merge variable FNAME, the filter would then be:
add_filter( 'yikes-mailchimp-FNAME-label', 'alter_form_field_firstname_labels' );
and you would then setup a new function alter_form_field_firstname_labels.
That is the most efficient way of doing things to ensure that the styles remain consistent between each form. As we move forward we should build out the developer documentation of our knowledge base to include examples such as this one.
Evan
Thread Starter
nae
(@nae)
wow! Thanks, this is great!
I already modified the process_form_shortcode.php to use the description field. But this is an easier way.
You could go further replacing “Correo Electrónico” with a dynamic field. In order to be able to fill it from the manager.
….. 😉
Thanks again. Resolved.
I would highly recommend against altering core files. The next update is going to wipe out ALL of your changes, thus resulting in wasted time on your end.
Thanks,
Evan