Login  Register

Dev - Multiple name/value per select input option

Posted by cjhowe on Feb 28, 2006; 8:16am
URL: http://ofbiz.116.s1.nabble.com/Dev-Multiple-name-value-per-select-input-option-tp166996.html

I am trying to pass multiple name/value pairs through
a single select input option.  Is there a way to
format the value so that when the form is posted it
gets sent and automatically exploded for the parameter
map.  Or does minilang support exploding a parameter?

ie

<select name="paymentMethodId">
  <option value="10001"/>
  <option value="10002"/>
  <option
value="billingAccount&billingAccountId=9001"/>
  <option
value="billingAccount&billingAccountId=9002"/>
</select>

I would also be open to a javascript solution that
resembled the following:

<form name="myform"
<select name="paymentMethodId">
  <option value="10001"/>
  <option value="10002"/>
  <option value="billingAccount" onSelect="set a=1" />
  <option value="billingAccount" onSelect="set a=2"/>
</select>

<input type="hidden" name="billingAccountId"
value="9001" someEvent="if (a!=1) disabled"/>
<input type="hidden" name="billingAccountId"
value="9002""if (a!=2) disabled"/>

</form>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev