- Posts: 9
- Thank you received: 0
Divided in custom fields
- Rafael Cavalcante
-
Topic Author
- Offline
- New Member
-
Less
More
8 years 1 month ago - 8 years 1 month ago #96197
by Rafael Cavalcante
Divided in custom fields was created by Rafael Cavalcante
Hello Tuan,
I need to create a custom field in list format that follows the following specifications.
TYPE - list
VALUES - yes
- no
SELECTED VALUES - no
Rate field - yes
When we select the NO option, the value of the plan remains unchanged. And when we select the YES option the value of the plan will be divided by 2.
In the values of the rates I put it like this:
/1
/2
Is not working.
How to insert the Mathematical division function correctly?
Grateful.
I need to create a custom field in list format that follows the following specifications.
TYPE - list
VALUES - yes
- no
SELECTED VALUES - no
Rate field - yes
When we select the NO option, the value of the plan remains unchanged. And when we select the YES option the value of the plan will be divided by 2.
In the values of the rates I put it like this:
/1
/2
Is not working.
How to insert the Mathematical division function correctly?
Grateful.
Last edit: 8 years 1 month ago by Rafael Cavalcante.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 1 month ago #96230
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Divided in custom fields
Assume the price of the plan is 100, then put the below values to fee values:
0
-50
By doing that, when users select No option, the price will be substracted by 50 and it should solve the issue
Tuan
0
-50
By doing that, when users select No option, the price will be substracted by 50 and it should solve the issue
Tuan
Please Log in or Create an account to join the conversation.
- Rafael Cavalcante
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
8 years 1 month ago #96312
by Rafael Cavalcante
Replied by Rafael Cavalcante on topic Divided in custom fields
Actually I already have a sum field added in the plan. I really need to divide by 2.
Please Log in or Create an account to join the conversation.
- Alan Bennett
- Offline
- Elite Member
-
Less
More
- Posts: 188
- Thank you received: 28
8 years 1 month ago #96315
by Alan Bennett
Replied by Alan Bennett on topic Divided in custom fields
I think what we really need is the ability to embed php in the specification of custom fields. Tuan and I discussed this some time ago.
See how another subscription component (RS Membership) offers this:
•(*) In the Values area custom PHP coding can be used, enclosed in between the following tags: //<code>,//</code>. Example (will add the current server date):
//<code>
return date();
//</code>
This would enable values to be set in any way we need.
See how another subscription component (RS Membership) offers this:
•(*) In the Values area custom PHP coding can be used, enclosed in between the following tags: //<code>,//</code>. Example (will add the current server date):
//<code>
return date();
//</code>
This would enable values to be set in any way we need.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 1 month ago #96334
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Divided in custom fields
Hello Rafael
The question is what amount will need to get to divide 2? Could you send me the link to subscription form and explain how the fee should be calculated?
I will then look at it to see whether there is a way to setup and guide you
Tuan
The question is what amount will need to get to divide 2? Could you send me the link to subscription form and explain how the fee should be calculated?
I will then look at it to see whether there is a way to setup and guide you
Tuan
Please Log in or Create an account to join the conversation.
- Rafael Cavalcante
-
Topic Author
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
8 years 1 month ago #96376
by Rafael Cavalcante
Replied by Rafael Cavalcante on topic Divided in custom fields
Hello Tuan,
Follow the link of the form, as you can see is very extensive.
www.cra-ce.org.br/websistema/index.php/r...soa-juridica/sign-up
In the option "Capital Stock" when the user selects an option a quantity is added to the value of the subscription. Therefore, since there are eight options in the field "Capital Social", it is not feasible to place only a simple subtraction.
It is necessary to create one another field that will have two selection actions (main / secondary) where main will be preempted the value without changes and Secondary that will be the value of the inscription, added to the value of Capital Social divided by 2.
(Inscrição+capital social)/2
In the descriptive custom rate field says that we can use any mathematic operation, but when I try to split it does not work.
Thanks for your help.
Follow the link of the form, as you can see is very extensive.
www.cra-ce.org.br/websistema/index.php/r...soa-juridica/sign-up
In the option "Capital Stock" when the user selects an option a quantity is added to the value of the subscription. Therefore, since there are eight options in the field "Capital Social", it is not feasible to place only a simple subtraction.
It is necessary to create one another field that will have two selection actions (main / secondary) where main will be preempted the value without changes and Secondary that will be the value of the inscription, added to the value of Capital Social divided by 2.
(Inscrição+capital social)/2
In the descriptive custom rate field says that we can use any mathematic operation, but when I try to split it does not work.
Thanks for your help.
Please Log in or Create an account to join the conversation.
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.