Title: Additional custom booking fields
Last modified: August 21, 2016

---

# Additional custom booking fields

 *  Resolved [moaschtr](https://wordpress.org/support/users/moaschtr/)
 * (@moaschtr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/)
 * Hi all,
    a quick question:
 * I am using customized registration fields (address and zip code) on my regular
   wordpress registration, using mainly [this code](http://blog.ashfame.com/2010/11/add-custom-field-registration-wordpress/).
   
   Since I do allow guest-booking on my events, wordpress requires users to fill
   out also address and zip code (error messages, because they can’t enter them 
   in the original form). Now to enable users to do that, I succesfully hooked `
   em_register_form` function to add those fields to the booking form.
 * Now my question:
    Since I’m quite new to wordpress and neither a coding expert:
   Is this a proper method of adding my fields or bears that any risks? Is it really
   that simple? 🙂 I read about data validation/sanitation, is this done automatically
   by wordpress?
 * Thanks for your info!
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914533)
 * Hi,
 * Can you post the code you used to hook into em_register_form?
 *  Thread Starter [moaschtr](https://wordpress.org/support/users/moaschtr/)
 * (@moaschtr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914541)
 * Sure, my fields are ‘adresse’, ‘plz’ and ‘ort’.
    I hooked into `em_register_form`
   with the following:
 *     ```
       <?php 
   
       add_action('em_register_form','mycustomfields_em'); 
   
       function mycustomfields_em() {
       ?>
       	<p>
       		<label for='adresse'>Adresse</label>
       		<input id="adresse" class="input" type="text" size="25" value="<?php echo $_POST['adresse']; ?>" name="adresse" />
       	</p>
       	<p>
       		<label for='plz'>PLZ</label>
       		<input id="plz" class="input" style="max-width: 160px;" type="text" size="5" maxlength="5" value="<?php echo $_POST['plz']; ?>" name="plz" />
       	</p>
       	<p>
       		<label for='ort'>Ort</label>
       		<input id="ort" class="input" type="text" size="20" value="<?php echo $_POST['ort']; ?>" name="ort" />
       	</p>
       	<?php
       }
   
       ?>
       ```
   
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914576)
 * this is already implemented at EMPro – [http://wp-events-plugin.com/documentation/custom-booking-forms/](http://wp-events-plugin.com/documentation/custom-booking-forms/)
 *  Thread Starter [moaschtr](https://wordpress.org/support/users/moaschtr/)
 * (@moaschtr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914586)
 * I know, thanks.
 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914619)
 * If you’re accepting user input, you’d definitely want to take a look at the various
   sanitization functions WordPress provides to security check the user input.
 *  Thread Starter [moaschtr](https://wordpress.org/support/users/moaschtr/)
 * (@moaschtr)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914620)
 * Thanks caimin_nwl, that’s what I ment. I’ll have a look at those… hoped that 
   maybe wordpress would do that automatically 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Additional custom booking fields’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [moaschtr](https://wordpress.org/support/users/moaschtr/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/additional-custom-booking-fields/#post-4914620)
 * Status: resolved