The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Pre-Parser module: Changing Entry Dependent upon Information - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Pre-Parser module: Changing Entry Dependent upon Information (/showthread.php?tid=475)



Pre-Parser module: Changing Entry Dependent upon Information - axel - Jan 31st, 2010

Alright, here's my delima.

A submission is sent in from a form that handles Registering Attnedees for an event.

They select the Badge type they want (3-day, 1-day, so on and so on).
Code:
<select name="amount" style="width: 365px">
<option value="35">3-Day Adult Badge ($35)</option>
<option value="20">1-Day Adult Badge ($20)</option>
<option value="30">3-Day Youth/Senior/Military ($30)</option>
<option value="18">1-Day Youth/Senior/Military ($18)</option>
</select>

And the amount is what sets the Badge in Form Tools because that amount is passed to PayPal to handle the purchasing. However, Prices have now changed and now I have to change the option group to understand the changes.

But the attendees who purchased it at the first price now are invalid if I change the Option Group.

So here's my question: What do I need to do in the Pre-Praiser to get the submission change a Price to a Text line.

Value Input = 35
Value Output = 3dayadult

I can manage to change the Value Input when prices change, but does anyone know the solution to achieving this?


RE: Changing Entry Dependent upon Information - axel - Jan 31st, 2010

Eh. Like usual, Javascript saved the day. Never mind!

Just if your interested:
I added this script to my page

Code:
<script type="text/javascript">
function setPrice(el){
var prices=[35, 20, 30, 18];
var p=el.options.selectedIndex;
el.form.elements['price'].value=prices[p];
}
</script>

And modified my dropdown box to help it and added a new field.
Code:
<select name="badgetype" style="width: 365px" onchange="setPrice(this);">
<option value="3adult">3-Day Adult Badge ($35)</option>
<option value="1adult">1-Day Adult Badge ($20)</option>
<option value="3discount">3-Day Youth/Senior/Military ($30)</option>
<option value="1discount">1-Day Youth/Senior/Military ($18)</option>
</select>
<input name="amount" type="hidden" value="35">