Posted: January 9, 2014 at 5:35 am
|
Hi, I need to have the form with the placeholder instead of label. Is possible? If yes, how? |
|
Hi, It is possible but you will need to change a function: in event-espresso/includes/functionsform_build.php is a function called event_form_build It is a large function but is pluggable ( http://codex.wordpress.org/Pluggable_Functions ) so could be copied to a custom plugin or to wp-content/uploads/espresso/custom_functions.php and edited there. That function will then override the default one. In the file you can remove the labels and add in the placeholder text as required. Alternatively you could use a combination of CSS and Javascript to achieve it, by hiding the labels with CSS and using JS to add the placeholders. |
|
Understood perfectly! One more question: in the custom_functions.php, there must be the check function “function_exists” or can I omit it? |
Hi Daniele, You want to declare the function within custom_functions.php and then other areas to check if has already been declared and use that (rather than trying to re-declare the function) So no the check should NOT be included within custom_functions.php. It should not cause an issue if you leave it in however. |
|
|
Thanks very much for the answer. Last thing about this: I want to disable the required field “email” in the “Personal informations” group questions. |
|
It is possible, but not recommended. If you look in the DB with phpMyAdmin, find the table called ‘wp_events_qst_group_rel’, find the row with group_id = 1 and question_id = 3 and delete it. |
|
Is it the only one way to obtain this? If I would like to revert it? |
Technically you could hide the email field with jQuery and append a dummy email address into the field to leave the database intact. |
|
|
Ok, thank you very much. |
The support post ‘Adding placeholder instead of label’ 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.