This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
merchant:epaymentform:reqfieldsjavascript [2015/04/14 13:18] charlie |
merchant:epaymentform:reqfieldsjavascript [2017/04/25 15:28] kat |
||
---|---|---|---|
Line 34: | Line 34: | ||
</script> | </script> | ||
</code> | </code> | ||
- | - You can make as many fields required as you want. To make a field required, repeat this section of code: | + | - You can make as many fields required as you want. To make a field required, repeat this section of code. Please note, requiring fields that are not on your payment form will break the entire field verification, causing no field requirements: |
- <code javascript> | - <code javascript> | ||
if (document.epayform.UMfield.value=="") { | if (document.epayform.UMfield.value=="") { | ||
Line 117: | Line 117: | ||
<input type="submit" name="submitbutton" value="Process Payment >>" onclick="return verify();"> | <input type="submit" name="submitbutton" value="Process Payment >>" onclick="return verify();"> | ||
</code> | </code> | ||
+ | -If the required field you want to add is also under the hidden fields section at the top of the form, remove the hidden field's line in accordance to the field. If the field you chose isn't in the hidden fields section you do not have to do this step. | ||
+ | **Example** : | ||
+ | UMinvoice as a required field. UMinvoice is in the hidden fields section. | ||
+ | |||
+ | * Delete from Hidden Fields Section : | ||
+ | <code> | ||
+ | <input type="hidden" name="UMinvoice" value="[UMinvoice]"> | ||
+ | </code> |