Jump to content

Search the Community

Showing results for tags 'validation'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 8 results

  1. I am trying to make a simple "Submit a Request" form, which will have fields like first name, Last name, email address, phone number, request, etc. Field names are like C_FirstName, C_Surname, C_Email, C_Phone, C_Request I want to validate text entries in the following fields as follows: First / Last name: No numerical characters are allowed Email Address : authenticate email according to https://www.w3resource.com/javascript/form/email-validation.php mobile no.: formatting and checking as per So far I have the phone script working, but my adaptation of the email script (or the combination of the two in the footer of the form) doesn't check the entry in the Email Address field. Any help sincerely appreciated Floris W3's ValidateEmail Script below: function ValidateEmail(mail) { if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value)) { return (true) } alert("You have entered an invalid email address!") return (false) } document.getElementById("caspioform").onsubmit=validateEmail;
  2. I have a text field for entering a mobile number on a submit Data Page. I would like to validate the mobile entered to be in the format 61xxxxxxxxx. Reason is I pass this number through zapper to send SMS updates in twilio to new members with their details. How can I validate the field on submission. I have already set the field to repeat for confirmation and a placeholder in the format I require the mobile, but people still add as for example 0456888222
  3. ANY help would be greatly appreciated!!!! Okay, I have a script that I think should work, but I can't get it to function....Here it is: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> <script> $("#caspioform").submit( function() { var selectedopts = $('[name=cbParamVirtual1]').getChildren(); for(i=0;i<selectedopts.length;i++) { if(selectedopts[i].val() == '') { return false; } } }); </script> The script is trying to validate the input (into a text field via barcode scanner) against a hidden dropdown (virtual field "cbParamVirtual1").... Event handler question/issues: CURRENTLY, the barcode scanner, as it scans, it hits "enter" (like a keyboard enter, I think) at the same time submitting the form I need the above code to keep it from submitting if the value isn't in the dropdown Is ".submit" the correct event handler for this? ...or do I use ".keypress"? maybe something else? Location of script question Do I put the script in the form's footer or header...or should I put this in the header of the webpage where it's embeded? I'm confused about when to use the form's header/footer vs the webpage header One more detail that I left out is that I have an iframe code deployed in the footer of the form...it's the only way I could get a report to update as the form (also in an iframe) is submitted....it works well, even though I've read you can't deploy inside another datapage.... that seems doesn't seem to hold true with iframes. However, would I need to change the form name above if I have the 2nd datapage deployed in the footer of the form????
  4. How can I validate a URL in an input page? To make sure it is in a correct format
  5. Hi everyone, can you help me? I want to People submit form person of IT receive mail, he can check yes or no if IT peaple checked yes then mail he's send to one person resposible of app http://howto.caspio.com/tech-tips-and-articles/common-customizations/tech-tip-how-to-validate-a-user-email-address/ i have already saw that, but only one mail is possible for validation. Thanks for your help.
  6. Hi everyone, can you help me? I want to People submit form person of IT receive mail, he can check yes or no if IT peaple checked yes then mail he's send to one person resposible of app http://howto.caspio.com/tech-tips-and-articles/common-customizations/tech-tip-how-to-validate-a-user-email-address/ i have already saw that, but only one mail is possible for validation. Thanks for your help.
  7. I need to ensure that values in a column in a tabular report are between 0 and 100 (They are meant to be a percentage impact figure to be entered by the user). I studied the JS example of creating column totals in a tabular report (see http://forums.caspio.com/index.php/topic/3171-js-calculate-column-sum-in-the-result-page/ ) and modified the code as follows, but I cannot get the script to fire at all. I added a number of debugging statements to no avail. I have tried an "onsubmit" type of call as well, apart from the below example. Ideally there should be a way to fire this at the end of adding / editing each row, but I could live with at the end of the whole page as well. At the end of the Header: <div id="cb_checkImpact"> At the beginning of the Footer: </div> <script> function f_check() { alert('Inside function'); var v_impact = 0; var cas_form = document.getElementById("cb_checkImpact"); if (cas_form.getElementsByTagName("table").length > 0) { alert('Found records'); var cas_rows = cas_form.getElementsByTagName("table")[1].getElementsByTagName("tr"); for(var rowIndex=1; rowIndex < cas_rows.length; rowIndex++) { alert('Inside row loop'); var cells = cas_rows[rowIndex].getElementsByTagName("td"); /* 1 – change value inside brackets to choose column to perform validation */ v_impact = cells[2].innerHTML; alert('Found value:'); alert(v_impact); if ( parseFloat(v_impact) < 0 || parseFloat(v_impact) > 100){ alert('Value in %Impact field must be between 0 and 100'); return(false); } alert('No issues found'); } } alert('About to call function'); f_check(); alert('Finished function'); </script>
  8. Hi everyone, I have found several scripts that do not allow to submit the data if the date is too late (or too early). Is it possible to deny to enter the data, if time is too late? I mean, if the data may be added only before 10 AM, and now is 11 AM, then the data is not added and some error message is displayed? Or more simple script, if the data may be added only before 10 AM, and a user tries to enter "11 AM", then the data is not added and some error message is displayed? Thank you for your time!
×
×
  • Create New...