Forums

Confirmation page does not work well with hidden fields.

evdebo 29 Apr, 2009
Hi all
i have a form containing a hidden field (in order to calculate the total amount based on number of tickets).

When i submit the form (without confirmation page), this works well (the e-mail as well as the data in the database are correct) using this as OnSubmit code - before sending e-mail:
<?php
$_POST["hidAmount"] = $_POST["selNumber"] * 15;
?>


However, when i use the "Confirmation page"-plugin, the calculated value doesn't show ... just the default one.

Edit: using ChronoForms 3.1RC 4.11 on a Joomla 1.5.9 installation

Does any one have some suggestions?

Any help appreciated!
evdebo
Max_admin 30 Apr, 2009
Hi evdebo,

I think you should now use this code at the top of the Confirmation page code box at the plugin config screen!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
evdebo 30 Apr, 2009
Thanks for your reply Max, but i'm afraid i'm not totally getting the point.

(snip)
I think you should now use this code at the top of the Confirmation page code box at the plugin config screen!
(snip)


When i edit the form (clicking form name in forms management), i get several tab pages, but not really the one you're referring to.
I notice (among others) these tab pages:
* Plugins: here i checked "Confirmation page" ... do I need to put something (i.e. "1") in the textbox next to it?
* RunOrder: these settings:
- Order of Autogenerated block: 3
- Order of Submit block: 2
- Order of Plugins block: 1
* Extra Form Code: do i need to put it (or something else) here? In that case, which block do i pick ("Extra code 1 -> 5")?

Thanks for your help!
evdebo
Max_admin 03 May, 2009
Hi evdebo,

you didn't configure the "confirmation page" plugin yet ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
evdebo 03 May, 2009
i thought i did ... is there something more i need to do than "writing" the page and checking the confirmation is needed? did i leave something out?

thanks!
evdebo
GreyHead 03 May, 2009
Hi evdebo,

In the Forms Manager - where the list of forms is - select the checkbox by the form you want to configure the plugin for, then click the plugin title in the left hand column and you'll get the plugin configuration dialogue (same process for all plugins).

Bob
evdebo 04 May, 2009
Ok, now i understand what you mean ... yes, i had done this (supplied a custom confirmation page which is showing me all entered data correctly, but the calculated field still having it's default value).
GreyHead 04 May, 2009
Hi evdebo,

Have you done as Max suggested and included the calculation code at the top of the Confirmation page code box?

Bob
evdebo 05 May, 2009
Hi Greyhead and Max,
thanks for still trying to help me!

i (had) tried your suggestion ... this is what i did:
- selected the checkbox next to the form in Forms Management
- clicked the Confirmation Page link on the left (Plugins section)
- i've put the suggested php-code in the Confirmation Page Code box ... at first with Editor Disabled-option set to "No", but then the php-code disappeared, so i disabled it (and it stayed)

... but still no luck :?

I added another test:
In Form HTML, the field gets default value -9:
<input value="-9" id="hidAmount" name="hidAmount" type="hidden" />

In On Submit code - before sending email this is changed to 15:
<?php
$_POST["hidAmount"] = 15;
?>

In Confirmation Page Code box, there is this code:
<?php
$_POST["hidAmount"] = $_POST["selAantal"] * 15;
?>
<div class="form_item">
  ... (snip) ...
  <div>Amount: <strong>{hidAmount}</strong></div>
  ... (snip) ...
</div>


However, i still get this -9 value ... do you have any suggestions left?

EDIT: i've just installed v3.1 RC5.0, but this did not solve the problem.
Max_admin 06 May, 2009
Hi evdebo,

don't use {hidAmount}, just use <?php echo $_POST['hidAmount']; ?>

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.