- Posts: 31
- Thank you received: 1
Dependent Custom Field - Trigger on Core field value?
- Duke S.
- Topic Author
- Offline
- Junior Member
Less
More
4 years 8 months ago #127220
by Duke S.
Dependent Custom Field - Trigger on Core field value? was created by Duke S.
The selection of Master Fields to setup a Dependent Field does not include any Core fields. Is there a way to have the dependent property set so the field will display when the number of people/tickets in #eb-form-number-group-members matches a value? I want to display different dependent field checkbox options depending on the number in the group.
If I need to do this with a javascript override, please suggest which file I should be working in.
If I need to do this with a javascript override, please suggest which file I should be working in.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
4 years 8 months ago #127223
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Dependent Custom Field - Trigger on Core field value?
Hello Duke
I would say that it's hard.For displaying purpose, you just need to look at the code components/com_eventbooking/themes/default/register/group_members.php and display fields base on data of number registrants
However, the difficulty is with data validation (if the field is required). If it's hidden, users could not enter data and it will cause wrong validation. You will then have to customize code in validate_and_store_group_members_data method in the file components/com_eventbooking/controller/register.php
In short, it's hard, so maybe you should find a different way to handle your requirement
Tuan
I would say that it's hard.For displaying purpose, you just need to look at the code components/com_eventbooking/themes/default/register/group_members.php and display fields base on data of number registrants
However, the difficulty is with data validation (if the field is required). If it's hidden, users could not enter data and it will cause wrong validation. You will then have to customize code in validate_and_store_group_members_data method in the file components/com_eventbooking/controller/register.php
In short, it's hard, so maybe you should find a different way to handle your requirement
Tuan
Please Log in or Create an account to join the conversation.
- Duke S.
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 1
4 years 8 months ago #127237
by Duke S.
Replied by Duke S. on topic Dependent Custom Field - Trigger on Core field value?
Helpful suggestions, thank you
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
4 years 8 months ago #127242
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Dependent Custom Field - Trigger on Core field value?
You're welcome. Hope you will be be able to customize code to meet your need. Just want to make it clear that you should implement the customization using override so that the change won't be lost when you update to future releases of the extension:
1. Once modification is done to the file components/com_eventbooking/themes/default/register/group_members.php, you need to copy that modified file to PATH_TO_TEMPLATE/html/com_eventbooking/register folder so that the change won't be lost when you update to future releases of the extension
2. For the customization to validate_and_store_group_members_data method, see instructions at eventbookingdoc.joomservices.com/develop...n-a-controller-class to see how to implement it as override
Regards,
Tuan
1. Once modification is done to the file components/com_eventbooking/themes/default/register/group_members.php, you need to copy that modified file to PATH_TO_TEMPLATE/html/com_eventbooking/register folder so that the change won't be lost when you update to future releases of the extension
2. For the customization to validate_and_store_group_members_data method, see instructions at eventbookingdoc.joomservices.com/develop...n-a-controller-class to see how to implement it as override
Regards,
Tuan
The following user(s) said Thank You: Duke S.
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 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.