W
|
wildwally 4/20/2012 |
I have a database containing the following fields: Field1 Field2 Field3 these are text fields where selections are made by radio buttons. What I need to do is: before the record is added, check whether these fields have any value. If any of them do, add the record If there were no selections in these fields, then show a popup "You must enter a value in at least one field". and not allow the page to be added until the user makes a selections. Can't seem to figure it out. Any help is appreciated.
|
![]() |
buddy author 4/21/2012 |
I think I can offer you some assistance with this. Couple different ways you could go about doing this. One make them required in the editor, then they highlight Red indicating where the field is on the page that still requires a value. This is most likely the simplest solution for you to take. An alternate method would be to code a if statement into the Before record added event section for the page. Something along the lines of this:
|
C
|
cgphp 4/22/2012 |
You can directly make a validation check in the "Javascript onload" event, so the popup doesn't close after you have clicked the "Save" button: var ctrl1 = Runner.getControl(pageid,'radio_name_1'); |