- Posts: 54
- Thank you received: 1
[SOLVED]how to-Custom Field, options with quantity
- nhtim
- Topic Author
- Offline
- Senior Member
-
Less
More
10 years 1 month ago - 10 years 1 month ago #62388
by nhtim
[SOLVED]how to-Custom Field, options with quantity was created by nhtim
I want to create a custom field that has multiple selections (A person could select one or more) and then state the quantity for each selection. The total price then needs to be calculated. I have not figured out how to complete this process. Can someone tell me how to go about this process?
Thanks,
Tim
Thanks,
Tim
Last edit: 10 years 1 month ago by nhtim.
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
10 years 1 month ago - 10 years 1 month ago #62390
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic how to-Custom Field, options with quantity
Set your first item level up as check boxes, allowing people to select which items they want.
For each of the check box items, set up corresponding dependent fee fields to handle the quantities -- these can be either dropdown lists (with values such as 1, 2, 3 ... 10, and fee values that correspond, eg. if the item is $10 each, then 10, 20, 30 ... 100) or text boxes (set your validation rules to allow a number only, and set up a fee formula to calculate the cost based on the number entered).
I have something similar running for one of my events where I need to keep track of several meal options. You can see it in action at www.sttherese.ca/subdomains/beta/index.p...2&Itemid=767&lang=en until May 18 when the event registration closes. In this case, I'm using yes/no radio buttons for each meal, and dependent fee fields linked to the "yes" response.
EDIT: No matter how you set it up, it can take a LOT of fields depending on how many options you need. In the example I posted above, here is what I needed to setup for custom fields:
For each of the check box items, set up corresponding dependent fee fields to handle the quantities -- these can be either dropdown lists (with values such as 1, 2, 3 ... 10, and fee values that correspond, eg. if the item is $10 each, then 10, 20, 30 ... 100) or text boxes (set your validation rules to allow a number only, and set up a fee formula to calculate the cost based on the number entered).
I have something similar running for one of my events where I need to keep track of several meal options. You can see it in action at www.sttherese.ca/subdomains/beta/index.p...2&Itemid=767&lang=en until May 18 when the event registration closes. In this case, I'm using yes/no radio buttons for each meal, and dependent fee fields linked to the "yes" response.
EDIT: No matter how you set it up, it can take a LOT of fields depending on how many options you need. In the example I posted above, here is what I needed to setup for custom fields:
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 10 years 1 month ago by James Riley. Reason: added EDIT and field list
The following user(s) said Thank You: Tuan Pham Ngoc
Please Log in or Create an account to join the conversation.
- nhtim
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 1
10 years 1 month ago #62393
by nhtim
Replied by nhtim on topic how to-Custom Field, options with quantity
James,
Thank you for the detailed instructions. I need it for the same reason... to set up meal choices. I am going to do this. GREAT EXPLANATION!
If I run into a snag, I am sure you will be able to help, but you explained it well.
Thanks,
Tim
Thank you for the detailed instructions. I need it for the same reason... to set up meal choices. I am going to do this. GREAT EXPLANATION!

Thanks,
Tim
Please Log in or Create an account to join the conversation.
- nhtim
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 1
10 years 1 month ago #62397
by nhtim
Replied by nhtim on topic how to-Custom Field, options with quantity
James,
Thank you for your help. I was able to get it working using the check boxes (I have 3 options), then I used the text box option you described.
How do you set the check boxes so there are horizontal instead of vertical?
On a side note... I observed something strange happen, which I may have to create another post about. I have a field for the main event cost for either child or adult. The next field is adult meal choices that are dependent on the event cost field. I also have a validated field for the child meal choices dependent on event cost. They were working properly before I made the changes to the particular meal choices I just added. NOW, instead of the adult meal choices popping up only if the adult event cost when selected. The adult meal choices are now showing up by default. I double checked my settings and they are correct for the adult meal choice. Have you encountered something similar?
Thank you for your help. I was able to get it working using the check boxes (I have 3 options), then I used the text box option you described.
How do you set the check boxes so there are horizontal instead of vertical?
On a side note... I observed something strange happen, which I may have to create another post about. I have a field for the main event cost for either child or adult. The next field is adult meal choices that are dependent on the event cost field. I also have a validated field for the child meal choices dependent on event cost. They were working properly before I made the changes to the particular meal choices I just added. NOW, instead of the adult meal choices popping up only if the adult event cost when selected. The adult meal choices are now showing up by default. I double checked my settings and they are correct for the adult meal choice. Have you encountered something similar?
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
10 years 1 month ago - 10 years 1 month ago #62404
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic how to-Custom Field, options with quantity
@nhtim
I've had problems like you mentioned when trying to set to dependent dependencies (eg. If A is selected, show B & C. If C is selected, show D & E), which I've read in another forum post is not fully supported yet even through the software will let you set it up.. I'm not quite sure if that is your situation, but that is where I know it will fail and produce the what you're seeing. If this is the case, you'll have to get creative and re-work things to use only 1 level of dependency.
As for setting the check boxes horizontal, I don't recall if there is an option is EB to set this or not (I thought there was, but I think I am getting mixed up with another Events engine that I used to use as I cannot see an option in EB...), Hopefully, it's there and I missed it when I took a quick look for it. You can probably make it display vertically with CSS. EDIT: SEE DEVELOPER TUAN'S ANSWER BELOW FOR THE PROPER WAY TO DO THIS.
EB's developer Tuan should be able to help you with both of these when Taiwan goes daylight
TUAN!! HELP!!!
I've had problems like you mentioned when trying to set to dependent dependencies (eg. If A is selected, show B & C. If C is selected, show D & E), which I've read in another forum post is not fully supported yet even through the software will let you set it up.. I'm not quite sure if that is your situation, but that is where I know it will fail and produce the what you're seeing. If this is the case, you'll have to get creative and re-work things to use only 1 level of dependency.
As for setting the check boxes horizontal, I don't recall if there is an option is EB to set this or not (I thought there was, but I think I am getting mixed up with another Events engine that I used to use as I cannot see an option in EB...), Hopefully, it's there and I missed it when I took a quick look for it. You can probably make it display vertically with CSS. EDIT: SEE DEVELOPER TUAN'S ANSWER BELOW FOR THE PROPER WAY TO DO THIS.
EB's developer Tuan should be able to help you with both of these when Taiwan goes daylight


James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 10 years 1 month ago by James Riley. Reason: added EDIT
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
10 years 1 month ago - 10 years 1 month ago #62414
by James Riley
Tim:
I had a few minutes to look at how to do it if having to do it manually via CSS. This works on my site without requiring the "!important" tag that I've included below. You can try removing it, but depending on where your custom CSS file loads in the load order, you might need it. . EDIT: SEE DEVELOPER TUAN'S ANSWER BELOW FOR THE PROPER WAY TO DO THIS without modifying layout via CSS.
Sample:
Tuan:
If there is no way already built in to EB, would you consider adding an option to Checkbox and Radio fields to allow switching individual fields between horizontal and vertical layout (defaulted to Vertical for the sake of back-compatibility)? I know that I would use this feature in styling my form layout if it is readily available.
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic how to-Custom Field, options with quantity
James Riley wrote: You can probably make it display vertically with CSS.
Tim:
I had a few minutes to look at how to do it if having to do it manually via CSS. This works on my site without requiring the "!important" tag that I've included below. You can try removing it, but depending on where your custom CSS file loads in the load order, you might need it. . EDIT: SEE DEVELOPER TUAN'S ANSWER BELOW FOR THE PROPER WAY TO DO THIS without modifying layout via CSS.
Code:
/* Make the following EventBooking ul's appear
horizontally rather than vertically */
#field_YOURFIELDNAME ul, #field_ANOTHERFIELDNAME ul { float:left !important; }
Sample:
Tuan:
If there is no way already built in to EB, would you consider adding an option to Checkbox and Radio fields to allow switching individual fields between horizontal and vertical layout (defaulted to Vertical for the sake of back-compatibility)? I know that I would use this feature in styling my form layout if it is readily available.
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 10 years 1 month ago by James Riley.
Please Log in or Create an account to join the conversation.
- nhtim
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 1
10 years 1 month ago #62417
by nhtim
Replied by nhtim on topic how to-Custom Field, options with quantity
I have not tried it yet on the second "first option" level I have, but if it automatically shows for this one as well, then I know my problem is related to the dependent dependencies. I will work on it tomorrow and report back. Others may find the information useful. Tuan may provide guidance to us when he sees this.
Please Log in or Create an account to join the conversation.
- nhtim
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 1
10 years 1 month ago #62418
by nhtim
Replied by nhtim on topic how to-Custom Field, options with quantity
James,
This is good info and could try it out. I am curious how you were able to get your radio buttons horizontal on the site you referenced above.
This is good info and could try it out. I am curious how you were able to get your radio buttons horizontal on the site you referenced above.
Please Log in or Create an account to join the conversation.
- James Riley
-
- Offline
- Platinum Member
-
10 years 1 month ago #62437
by James Riley
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Replied by James Riley on topic how to-Custom Field, options with quantity
Hey -- I guess I forgot that I set that up manually in the exact same way that I suggested for the checkboxes: ul {float:left;} . I feel foolish that I had to go and look at my code to see how I did it, and that I had to re-do it again today with the checkbox answer I posted earlier :silly:
My exact css for the horizontal radio buttons on my above event, making use of css (the [id^="field_sts2015_Meals_"] part) that applies the override to all elements with the common prefix (elements with an id starting in "field_sts2015_Meals_") I gave all the radio fields I created is:
My exact css for the horizontal radio buttons on my above event, making use of css (the [id^="field_sts2015_Meals_"] part) that applies the override to all elements with the common prefix (elements with an id starting in "field_sts2015_Meals_") I gave all the radio fields I created is:
Code:
[id^="field_sts2015_Meals_"] .controls fieldset ul { float: left; }
James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
10 years 1 month ago #62444
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic how to-Custom Field, options with quantity
Hmm
You should not have to change css to control it. Just set "Size" attribute of the custom field to number of options you want to be displayed per row and it should be OK. Could you please try my solution ?
BTW, I am from Vietnam. My timezone is GMT + 07, not Taiwan
.
Tuan
You should not have to change css to control it. Just set "Size" attribute of the custom field to number of options you want to be displayed per row and it should be OK. Could you please try my solution ?
BTW, I am from Vietnam. My timezone is GMT + 07, not Taiwan

Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.