- Check client side that any 2 out of three fields have been completed before allowing submision of a form
- Show/hide data capture fields based on the value of a check box (all client side)?
Check client side that any 2 out of three fields have been completed before
Share
Apex 4.0 has the new feature called Dynamic Actions that can perform Javascript and AJAX processing that you define declaratively, i.e. without having to write any (or much) Javascript.
1) Check client side that any 2 out of three fields have been completed before allowing submision of a form
You can create a Dynamic Action that fires on page submit, performs a test, and depending on whether the test returns TRUE or FALSE cancels the submit. However, from my understanding of Dynamic Actions (which you can try out yourself at http://tryapexnow.com) in this example the condition to test would be a Javascript expression like this:
(I hope I have that syntax correct.)
2) Show/hide data capture fields based on the value of a check box (all client side)
This can be done without writing any Javascript, using a Dynamic Action. Assuming the checkbox value is ‘Y’ when checked then the Dynamic Action’s attributes would be something like: