How-To

Position Email among UDFs

ABPro has two types of data fields, core data fields that are built in, and User Defined Fields (UDFs) which are customer specific.

Email is a core data field.

ABPro, like Joomla, just uses a single Name field. This is linked to the Name field in the Joomla Users table.

If you want to use an UDF to capture last name and you want email below last name, you need to move email into the code loop that places UDFs.

 

This modification is done to the booking screen view. For this How-To we will use the GAD booking screen default view which is file:
 \components\com_rsappt_pro3\views\booking_screen_gad\tmpl\default.php

 

There are two steps:

  1. Remove or comment out (better) the existing email input code
  2. Add the email input code into the UDF code loop, after a specific UDF id has been processed.

 

 

Step 1

Around line 716 look for:

 

Comment out the email <tr>

 

 

Step 2

Udfs are added with a for loop.

At the end of the loop you can check the id of the last UDF added and place the email code when you see the one you want.

In this example the UDF Last Name is id 25 so we want to drop in the email code when we see UDF id has been placed on screen.

Same file, around line 828 look for..

 

Insert code that will look for UDF id 25 and insert email when found..

 

That's it..

 

Note: This process will need to be repeated for the mobile views if you are using them.


Ensure you modify the correct view(s) for the booking screen you are using.

GAD Booking screen view files:

  • \components\com_rsappt_pro3\views\booking_screen_gad\tmpl\default.php
    (the default desktop view)
  • \components\com_rsappt_pro3\views\booking_screen_gad\tmpl\default_mobile.php
    (used if mobile detected and 'display simple on mobile' set to No)
  • \components\com_rsappt_pro3\views\booking_screen_gad\tmpl\default_mobile_simple.php 
    (used if mobile detected and 'display simple on mobile' set to Yes)


Wizard Booking screen view files:

  • \components\com_rsappt_pro3\views\bookingscreengadwiz\tmpl\default.php
    (the default desktop view)
  • \components\com_rsappt_pro3\views\bookingscreengadwiz\tmpl\default_mobile.php
    (used if mobile detected and 'display simple on mobile' set to No)
  • \components\com_rsappt_pro3\views\bookingscreengadwiz\tmpl\default_mobile_simple.php 
    (used if mobile detected and 'display simple on mobile' set to Yes)


Simple Booking screen view files:

  • \components\com_rsappt_pro3\views\booking_screen_simple\tmpl\default.php
    (the default desktop view)
  • \components\com_rsappt_pro3\views\booking_screen_simple\tmpl\default_mobile.php
    (used if mobile detected)