I want to make a form in which you can order tapas from a dropdown.
In the field 'Prijs' the price of the item has to be generated. The value of price is in the table.


I am struggling a couple of days now and dont know you to solve this.
in the field 'selecteer tapas' i have a change event which reloads the price field.
In the price field i have a reload event which call the event 'dynamic'.
There i want to extract the price from the table but how do i know which item in the dropdown has been selected?
Website: Example
It is possible to get an account
In the field 'Prijs' the price of the item has to be generated. The value of price is in the table.
I am struggling a couple of days now and dont know you to solve this.
in the field 'selecteer tapas' i have a change event which reloads the price field.
In the price field i have a reload event which call the event 'dynamic'.
There i want to extract the price from the table but how do i know which item in the dropdown has been selected?
Website: Example
It is possible to get an account
There i want to extract the price from the table but how do i know which item in the dropdown has been selected?
When you reload the whole form data is sent and you can get the value of any field using {data:field_name} which you can use in a ReadData to get the results you need!
For a normal form it is indeed simple.
However for a area_repeater just {data:field_name} doesn't work.
How do i know which row is selected? {var:area_repeater2.key} doesnt work in a ReadData.
And when my text field (which is in the aree repeater) is reloaded it throws away it's iterate id and name. So when the id = bestellijst1prijs_prijs then after the reload it is prijs.
You can test it in the example
However for a area_repeater just {data:field_name} doesn't work.
How do i know which row is selected? {var:area_repeater2.key} doesnt work in a ReadData.
And when my text field (which is in the aree repeater) is reloaded it throws away it's iterate id and name. So when the id = bestellijst1prijs_prijs then after the reload it is prijs.
You can test it in the example
In the reload event you can use a Debugger to check all the form inputs which have been passed
If it was so simple i wouldn't be asking.
Here is the debug.

I have tested it without the area_repeater and then there is no problem. However when you use a area_repeater there isnt any variable that shows which row you are editing.
So it aint possible to get dynmicaly change the sql query.
And then there is another problem.
A {View: filename} function doesnt work in a area repeater.
Before the reload the input looks like this.
Here is the debug.
I have tested it without the area_repeater and then there is no problem. However when you use a area_repeater there isnt any variable that shows which row you are editing.
So it aint possible to get dynmicaly change the sql query.
And then there is another problem.
A {View: filename} function doesnt work in a area repeater.
Before the reload the input looks like this.
<input readonly="readonly" data-inputmask=" 'alias' : 'currency' , 'prefix' : '€ ' , 'radixPoint' : ','" =""After the reload the id and name changed to the default value and not to the key in the area_repeater.
data-events='[{"sign":"change","action":["add"],"value":"","identifier":["subtotaal_tapas"]}]'
data-reloadurl="index.php?option=com_chronoforms6&cont=manager&chronoform=bestelformulier&event=dynamic&tvout=view"
placeholder="" name="bestellijst[1][prijs]" id="bestellijst1prijs_prijs" value="" type="text" />
<input readonly="readonly" data-inputmask=" 'alias' : 'currency' , 'prefix' : '€ ' , 'radixPoint' : ','" =""
data-events='[{"sign":"change","action":["add"],"value":"","identifier":["subtotaal_tapas"]}]'
data-reloadurl="index.php?option=com_chronoforms6&cont=manager&chronoform=bestelformulier&event=dynamic&tvout=view"
placeholder="" name="prijs" id="prijs" value="" type="text" />
This topic is locked and no more replies can be posted.