Jump to content

pavitra2410

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1

pavitra2410 last won the day on April 11 2014

pavitra2410 had the most liked content!

About pavitra2410

  • Rank
    Newbie
  1. This script will apply to submission forms when user enters a value and it automatically formats into $X,XXX.XX. The field that will store this value much be a Text(255). Add an HTML block and paste the following script. Replace FIELDNAME with the field name from your table. <script> function formatAsDollars(el) { el.value = el.value.replace(/[^\d]/g,'').replace(/(\d\d?)$/,'.$1').replace(/^0+/,'').replace( /\d{1,3}(?=(\d{3})+(?!\d))/g , "$&,"); el.value = el.value ? '$' + el.value : ''; } document.getElementById( 'InsertRecordFIELDNAME' ).onkeyup = function() { formatAsDollars(this); } document.getElementById("InsertRecordFIELDNAME").onchange= function() { formatAsDollars( this ); } </script>
  2. To make the field non-editable, add this to your JavaScript document.getElementById('EditRecordSupportRequiredYes').disabled= true; document.getElementById('EditRecordSupportReadyYes').disabled= true;
  3. Just add the following JavaScript in a footer of the submission form to validate for that field. Replace XXX with your value. <script> var num=XXX; function chk_num(){ var mynum = document.getElementById('InsertRecordFIELDNAME').value; if ( mynum < num ) { alert('Enter your message here'); return false; } } document.getElementById('caspioform').onsubmit=chk_num; </script>
  4. Yes, for each question, there is a field in the table that stores the correct answer. For example: Table Structure would be: ID FirstName LastName DOB Question1 Correct1 Question2 Correct2 Question3 Correct3 You will have as many correct fields as there are question fields.This is a hidden field in the submission form and you can specify the default value while configuring your DataPage and this gets inserted into the table.
  5. Here are the steps to take to create a Quiz in your Caspio bridge. 1) Create a new table, and add all the fields you want. (make sure to have an ID field as autonumber and a 'correct answer' field for every question field) 2) Create a submission form based on the above table 3) Enable advanced options, enable parameters 4) In the Web Form wizard, Select Fields, don't add the ID field, but select the checkbox 'On exit pass Autonumber ID field as parameter' at the bottom of the wizard. 5) Add all fields from the table that you would like to display 6) Make all 'correct answer' field as 'Hidden' in Form element 7) Under field options, default value, type in your default value for each answer 8) In the Destination & Triggers screens, add the following JavaScript to redirect to report page after submit: <script type="text/javascript"> function Redirect() { window.location="<URL of report datapage>&id=[@InsertRecordID]"; } document.write("You will be redirected to your answers in 10 sec."); setTimeout('Redirect()', 10000); </script> 9) In the above code, change the URL in window.location, to the URL of the report DataPage from step (11) and add the parameter id to it. You can insert the parameter from the 'Insert' option to the right 10) Click Finish 11) Now create a Details report page, enable advanced options and parameters 12) Filter based on pre-defined criteria, check box for Allow parameters in search criteria and radio button for Bridge and external parameters 13) In 'Search and Report Wizard-Select Filtering fields' -Add only the ID field and click Next 14) In the Configure filtering fields screen, select the ID field from the left and click on 'Advanced' tab 15) Check the box for 'On load' 16) Change dropdown to 'External parameters' and type in the parameter name from step 8 – [@id], click Next 17) Select all the fields to display and configure as you wish and click finish So when a user submits data using the submission form, they will be redirected to the report page after 10 seconds to display the results.
  6. Hello Duncan, One workaround would be to create the submission form and have the user submit the date. Upon submit, he can be redirected to another Details DataPage where you will pass the ID from the submission form as a parameter. You can have a pre-defined criteria for this Details page and add a calculated field with the following SQL code.This will display the details to the user upon submit with the day of the date entered. SELECT DATENAME(dw,[@field:Date_submitted]) I hope this helps.
×
×
  • Create New...