Support

Home Forums Event Espresso Premium Changing Label of Personal Information Fields

Changing Label of Personal Information Fields

Posted: April 14, 2014 at 10:38 pm


cmessengerlehmann

April 14, 2014 at 10:38 pm

On this page: http://cloud2.hyperweb.ca/~sosfirs2/?page_id=10&ee=512 I would like to rename the Phone and Email field to Parent’s Phone and Parent’s Email. I have created a question group for the fields I need but Phone and Email are part of the Personal Information and cannot be changed so now I have 2 fields for phone and email each but only need the ones that are labelled parent’s.

Can I rename the phone and email field only for this course. I have many other courses in this site that require just Phone and Email.

Thanks


Dean

April 15, 2014 at 1:08 am

Hi,

Renaming them for one event only isn’t possible, unless you look at custom coding something.

If it were me I would look to add a little bit of custom javascript to the event_registration_display.php template file.

Something like this, where 512, is the event ID

<script>

if( jQuery('#phone-512-0-1').length > 0) {
	jQuery('#phone-512-0-1').prev().text('Parents phone number');
	jQuery('#email-512-0-1').prev().text('Parents email');
}
</script>


cmessengerlehmann

April 15, 2014 at 3:59 am

Hi Dean, thanks for the response. Unfortunately this will not work because there are multiple events for this requirement and the events change on a regular basis so it would seem to mean that this script’s event id would need to be updated regularly.

Would that particular script work as is or is there more which is needed? Is it possible for the script to work on a category level?

Thanks.


Dean

April 15, 2014 at 7:05 am

Hi,

That would work for a single event yeah.

You could change it to look for a category but you would need to add in an extra line above it to get the category details. The javascript would need to be changed as well to do a check on the category

<input type="hidden" id="ee_check_cat" value="<?php echo $event->category_id; ?>" />

<script>

var cat_check = jQuery('#ee_check_cat').val();

//cat_check number needs to be the category ID number
if( cat_check == 2 ) {
	jQuery('label[for="phone"]').text('Parents phone number');
	jQuery('label[for="email"]').text('Parents email');
}
</script>

The support post ‘Changing Label of Personal Information Fields’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso