Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by wfadmin

  1. I have a multipage form that I'd like to deploy using a tabbed interface. I'd like to deploy the datapages on our Oxwall site on a blank page. Up to now, I've managed to embed the deploy code for one page, but I'm having a hard time figuring out how to create the tabbed interface given the existing Caspio tutorials. I have the datapages linked through passing parameters, and so Tab1 would route to Tab2 to Tab3, etc. Any help on how to set up the html would be greatly appreciated!
  2. Hi Xiang, This has worked great! But I've just realized that an additional condition needs to be included in here, and I'm not sure how to structure the language. I have a field in my Submission page called student_status, and I only want to apply the function check () and return false when student_status !== "I do not currently teach English but plan to when I finish my studies". If student_status == "I do not currently teach English but plan to when I finish my studies", I would like the user to be able to submit the page regardless of the sum value, as the calculate function does not apply to these users. Would you have a suggestion on how to incorporate this additional condition into the script? Thanks, Aimee
  3. Hi Xiang, I've used your revised version above and it works perfect! However, I want it to apply to two different fields - ie, the field name_last and the name_first. I've tried adding an HTML Block under each of the fields in the DataPage, and I'm having a hard time getting them to work simultaneously. In other words, one field will be capitalized correctly upon submission and the other will not. Here are the scripts I'm using: first field (name_last) <script type="text/javascript"> function capitalize() { var fieldname = "name_last"; fieldname = "InsertRecord"+fieldname; var value = document.getElementById(fieldname).value; var newVal = ''; val = value.split(' '); for(var c=0; c < val.length; c++) { newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length).toLowerCase() + ' '; } document.getElementById(fieldname).value = newVal; } document.getElementById('caspioform').onsubmit=capitalize; </script> second field (name_first) <script type="text/javascript"> function capitalize() { var fieldname2 = "name_first"; fieldname2 = "InsertRecord"+fieldname2; var value2 = document.getElementById(fieldname2).value; var newVal2 = ''; val2 = value2.split(' '); for(var c=0; c < val2.length; c++) { newVal2 += val2[c].substring(0,1).toUpperCase() + val2[c].substring(1,val2[c].length).toLowerCase() + ' '; } document.getElementById(fieldname2).value = newVal2; } document.getElementById('caspioform').onsubmit=capitalize; </script> Any help is greatly appreciated!
  4. Hi Xiang, Thanks so much for the response! This seems to work great, except for the following - when I fill in a value into the field name in an undesired format (i.e. JOHN or john), it changes to the correct format when I click the SUBMIT button (i.e. John). However, the data doesn't get submitted, and I am not taken to a new page. So, in other words, the format change happens upon clicking SUBMIT, but nothing else does. Any suggestions? Thanks, AR
  5. Hi all, I'm working on an application and I've run into an issue in which many applicants enter their names with all caps instead of with proper capitalizacion (i.e. JOHN instead of John). I've used the guidance from above to adjust the script as follows - my variable is "name_last": <script type="text/javascript"> document.getElementById("InsertRecordname_last").onchange = document.getElementById("InsertRecordname_last").style.textTransform="capitalize"; function capitalize() { var value = document.getElementById('InsertRecordname_last').value; var newVal = ''; val = value.split(' '); for(var c=0; c < val.length; c++) { newVal += val[c].substring(0,1).toUpperCase() + val[c].substring(1,val[c].length) + ' '; } document.getElementById('InsertRecordname_last').value = newVal; } document.getElementById('caspioform').onsubmit=capitalize; </script> This is working well when I test it by entering in all lowercase. However, when I try it by entering in all upper case, the script allows for this. The overall goal is to save into the dB names that are structured with proper capitalization (not all lowercase nor all uppercase). Looking for assistance, as I'm a javascript novice! Thanks, AR
  6. Aurora, This is fantastic and exactly what I needed. Is there a way to also add in an alert if the value>=0? (i.e. if the sum is less than 100%)? I want to ensure that those responding to the form enter exactly 100 percent in the fields specified. Thanks. AR
  • Create New...