ciaociao Posted February 5, 2010 Report Share Posted February 5, 2010 i want add in a form validation control, but i don't know where i can add Javascript and how i can identify the form fields. is there help for me? Quote Link to comment Share on other sites More sharing options...
kRv Posted February 5, 2010 Report Share Posted February 5, 2010 You can add JavaScript code to HTML block or to Header and Footer. All field names in the DataPage, correspond to the following rule: New Web Form - name has a prefix InserRecord; Update/Details Web Form - name has a prefix EditRecord; The name of the virtual field for all types of pages has a prefix cbParam; Name field on the Search & Password recovery DataPages, based on the following formula: prefix "Value" + field display order + _ + field criteria display order. For example, if you have one field with one criteria on search page, field name will be "Value1_1". <script type="text/javascript"> alert(document.getElementById("InsertRecordStateName").value); </script> Quote Link to comment Share on other sites More sharing options...
ciaociao Posted February 5, 2010 Author Report Share Posted February 5, 2010 Sorry, but i have inserted the script but it not works. I explain the situation: - one field of form is called state - so i insert in the form header this code: <script type="text/javascript"> vat state=document.getElementById("state"); if (state != "aperto") then alert("State can be only aperto."); Where is the mistake? Quote Link to comment Share on other sites More sharing options...
arrow1125x Posted February 6, 2010 Report Share Posted February 6, 2010 you are missing .value at the end of the document.getElementById line: var state=document.getElementById("state").value; if (state != "aperto") then alert("State can be only aperto."); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.