- This topic has 6 replies, 3 voices, and was last updated 7 years ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Add a custom field to Front End Submit form
I need to include a ‘Company/Organisation’ field on the Front End Submit form. I’ve read through the documentation & I believe that custom attributes may be the way forward as per this clause…
Well, in fact it is easier than thought. Just by using
EMEFS::attribute(‘phone2’)
in the form template, the attribute phone2 is available and can be used in an event template via #_ATT{phone2}
However, I can’t make it work. Any clues?
Gareth
A little bit more explanation is needed: is the attribute visible in the form? Which form did you change? And where in the event did you add the attribute then?
I’m using a custom form (form.php with fields removed that aren’t required). I’ve added the following into the form…
<div class=”input”>
<label for=”company”><?php _e(‘Company/Organisation’,’events-made-easy-frontend-submit’); ?> <small><?php _e(‘required’,’events-made-easy-frontend-submit’); ?></small></label><br />
<?php EMEFS::attribute(‘company’); ?>
<?php EMEFS::error(‘company’); ?>
</div>
I do not get an input field on the form. I’m assuming I’ve got this completely wrong. If custom attributes are not the correct way to achieve this, is there a better way?
Thanks for your help
Gareth
Are you sure you’re using that particular form.php ? Maybe another template is being used.
Yes, definitely sure. If I change anything else in the php code, the form changes.
In fact: you’re totally correct! There is a bug with attributes of type “textarea” (the default type).
I released 1.0.27 (and updated the doc too). So if you want just a text-input field, do this:
Brilliant Franky. It’s working perfectly now!
Thanks very much…