How to edit Contact Form to have a Phone Field. - Joomla! Forum - community, help and support


hi guys,

i still can not believe after these years joomla have not inculded 'phone number' field on default contact form.

with arrival of custom fields in joomla, know it's possible create more powerful contact form, find documentation bit thin on how edit form.

i have added custom field - phone form, issue puts new field @ bottom of form.

following, 2 common edits feel joomla users know how do.

edit 1) want have new 'phone' field positioned under "email" field.

edit 2) want remove word "fields" form.

can done?

contact-field-edit.jpg


i know use 3rd party component contact form, hoping custom fields - joomla may able now.

look forward help...

ps> please make sure joomla 4 has phone number field in default - contact form.

cheers,
syco

hi,

you have create layout override file components/com_contact/views/contact/tmpl/default_form.php , render each field manually in order want.

so instead of

code: select all

<?php foreach ($this->form->getfieldsets() $fieldset) : ?>
   ...
<?php endforeach; ?>



you should use like:

code: select all

<?php echo $this->form->renderfield('contact_name'); ?>
<?php echo $this->form->renderfield('contact_email'); ?>
....





Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support