FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pre-Parser module: Changing Entry Dependent upon Information
#1
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?
Reply
#2
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">
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)