Events Made Easy Forums How do I … Add a custom field to Front End Submit form

  • This topic has 6 replies, 3 voices, and was last updated 7 years ago by Anonymous.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #57013
    Anonymous
    Inactive

    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

    #57014
    Franky
    Keymaster

    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?

    #57015
    Anonymous
    Inactive

    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

    #57022
    Franky
    Keymaster

    Are you sure you’re using that particular form.php ? Maybe another template is being used.

    #57027
    Anonymous
    Inactive

    Yes, definitely sure. If I change anything else in the php code, the form changes.

    #57029
    Franky
    Keymaster

    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:

    #57031
    Anonymous
    Inactive

    Brilliant Franky. It’s working perfectly now!
    Thanks very much…

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top