Hello,
My task:
I have an order form (something like a shopping cart) for wines. I need to calculate prices per order-lines and a full amount for the cart before ordering through email. http://www.eschberger.at/index.php?option=com_chronoforms5&chronoform=bestellungen. There is no function on submit yet, so you can try "Vorschau" and then klick "Back".
My setup:
Values are saved on "preview" in $form->data['zeilen'], setup like here: https://www.chronoengine.com/faqs/70-cfv5/5245-how-can-i-use-the-multiplier-in-cfv5.html The one thing I did not add was the paragraph about javascript there. I did not need it so far. Multiplier works fine when filling out the first time.
When I click on the button "preview" I see my order lines with the calculated prices per line. The values are calculated from a price array in php and saved in $form->data['orderlines'].
I can click "back" to change my order. I did it like this example (with AJAX): https://www.chronoengine.com/forums/posts/f2/t99978.html
My problem:
If I go to the preview page and come back to make changes to the lines, then my first line in the multiplier is shown with empty values (second ore more are fine) and I cannot add another line. If I change values in the lines they are not saved to $form->data.
What I tried:
Then it basically works but then in my option texts all the "0" are also replaced like "1,75 l...", "2,75 l..."
I know I should stay with # but it is not working. Any ideas?
Thanks,
Sigrid
My task:
I have an order form (something like a shopping cart) for wines. I need to calculate prices per order-lines and a full amount for the cart before ordering through email. http://www.eschberger.at/index.php?option=com_chronoforms5&chronoform=bestellungen. There is no function on submit yet, so you can try "Vorschau" and then klick "Back".
My setup:
Values are saved on "preview" in $form->data['zeilen'], setup like here: https://www.chronoengine.com/faqs/70-cfv5/5245-how-can-i-use-the-multiplier-in-cfv5.html The one thing I did not add was the paragraph about javascript there. I did not need it so far. Multiplier works fine when filling out the first time.
When I click on the button "preview" I see my order lines with the calculated prices per line. The values are calculated from a price array in php and saved in $form->data['orderlines'].
I can click "back" to change my order. I did it like this example (with AJAX): https://www.chronoengine.com/forums/posts/f2/t99978.html
My problem:
If I go to the preview page and come back to make changes to the lines, then my first line in the multiplier is shown with empty values (second ore more are fine) and I cannot add another line. If I change values in the lines they are not saved to $form->data.
What I tried:
name: zeilen[0][wein]
id: zeilen_0_wein
name: zeilen[0][menge]
id: zeilen_0_menge
Then it basically works but then in my option texts all the "0" are also replaced like "1,75 l...", "2,75 l..."
I know I should stay with # but it is not working. Any ideas?
Thanks,
Sigrid
Hi Sigrid,
You probably need a little custom script to reset the correct values on reload. I'm travelling this week and can't easily check your form to see exactly what is happening. I'll be back at my desk next week and can look then.
Bob
You probably need a little custom script to reset the correct values on reload. I'm travelling this week and can't easily check your form to see exactly what is happening. I'll be back at my desk next week and can look then.
Bob
This topic is locked and no more replies can be posted.