We designed a contribution form with an "Other" option, where the "Other" button enables a value entry field.
When submitting the form with an "Other" amount, it is not submitting the value as intended.
Have tried several modifications to debug but without success. Any thoughts? Thanks.
Validation response:
Basket Information
The following are the minimum required fields for an item. At least one item has to be included in the basket.
When submitting the form with an "Other" amount, it is not submitting the value as intended.
Have tried several modifications to debug but without success. Any thoughts? Thanks.
Code:
<div class="donation-info"> <h4 class="section-header">Please select a donation amount</h4> <div class="donation-amount"> <label><input type="radio" name="UnitPrice" id="radio" value="100" data-parsley-required data-parsley-required-message="Please select a donation amount" data-parsley-errors-container="#amount-error" /><span>$100</span></label> <label><input type="radio" name="UnitPrice" id="radio" value="250" /><span>$250</span></label> <label><input type="radio" name="UnitPrice" id="radio" value="500" /><span>$500</span></label> <label><input type="radio" name="UnitPrice" id="radio" value="1000" /><span>$1000</span></label> <label><input type="radio" name="UnitPrice" id="radio" value="5000" /><span>$5000</span></label> <label><input type="radio" name="UnitPrice" id="radio" value="Other1" /><span>Other</span></label> <label class="other">Enter Amount: <input name="Other1" type="text" id="Other1" size="10" disabled data-parsley-required /></label> <input name="ItemID" type="hidden" id="ItemID" value="1" /> <input name="ItemName" type="hidden" id="ItemName" value="Donation" /> <input name="Quantity" type="hidden" id="Quantity" value="1" /> <input name="UnitDeductible" type="hidden" id="UnitDeductible" value="100%" /> </div> <div id="amount-error"></div> </div>
Basket Information
The following are the minimum required fields for an item. At least one item has to be included in the basket.
Common name | FaaS field name | Required? | Example | Posted |
ItemID | ItemID | YES | 1 | 1 |
Item name | ItemName | YES | T-Shirt | Donation |
Item quantity | Quantity | YES | 1 | 1 |
Item unit price | UnitPrice | YES | 10 | Other1 |
Comment