Jump to content

ShWolf

Caspio Guru
  • Content Count

    105
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ShWolf

  1. Hello brbbrid, Insert this script into the Footer of your DataPage: <script type="text/javascript"> setTimeout(function(){ var v_button = document.getElementById('Submit'); var v_date1= document.getElementById("InsertRecorddate1"); var v_date2= document.getElementById("InsertRecorddate2"); if (!v_date1 || !v_date2) return false; v_date1.onchange = v_date2.onchange = function(){ v_button.disabled = !f_checkButton(); }; v_button.disabled = !f_checkButton(); function f_checkButton(){ var v_regExp = /(\d{1,2})\/(\d{1,2})\/(\d{4})/; if(!v_date1.value) return true; if(!v_regExp.test(v_date1.value)) return false; if(!v_regExp.test(v_date2.value)) return false; try{ var v_year1 = parseInt(v_date1.value.match(v_regExp)[3]); if (v_year1 <= 2014) return false; var v_dateObj1 = new Date(v_date1.value); var v_dateObj2 = new Date(v_date2.value); if(v_dateObj1 == v_dateObj2) return false; if(v_dateObj2.getTime() < v_dateObj1.getTime()) return false; }catch(v_ex){} return true; } }, 100); </script> And replace InsertRecorddate1 and InsertRecorddate2 with your Date field IDs. How this script works: — You can submit empty values to the Date1 and Date2 fields — If Date1 field is not empty and Date2 field is empty, then "Submit" button will be disabled — If Date1 field is empty and Date2 field is not empty, then "Submit" button will be enabled — If Date1 field contains date with year 2014 or less, then "Submit" button will be disabled — If Date1 field contains date with year 2015 or greater and Date2 field contains date less than in Date1 field, then "Submit" button will be disabled Let me know if this helps.
  2. Hello brbbrid, Which localization is used in your DataPage? The script will depend on the format of date.
  3. Hi, Unfortunately, there is no "Hide if blank" feature for the Tabular report. You can use JS, but if you will hide column fields it will broke report's markup.
  4. Hello Staaks, You can look at these links: http://stackoverflow.com/questions/4938374/maintain-div-scroll-position-on-postback-with-html-javascript (But in this case you should add anchor before the form) and http://www.devnetwork.net/viewtopic.php?f=13&t=51544 On the other hand, iFrame deployment is still the best solution if you do not want more scripting on the page. If you want to track the page where submit has occurred, just add one more text field to the datasource table and in the wizard set Hidden form element for this field with "On load, receive" -> System parameter -> Host URL. Let me know if this helps.
  5. Hi Did you use two DataPages? Which types? And what is the goal you want to achieve? If you are using Search and Report DataPage type, you can add several criteria for each field on the 'Configure Search Fields' step and change logical operator between criteria. Maybe this is what you need? Please provide more information about your DataPages.
  6. ShWolf

    Search By Year

    Hi You can't change precision of the field via JS. And as for your last post, looks like the same you can do without JS, just select Dropdown/Listbox form element for the VE_game_gamedatetime field and select precision 'year'. In the 'Source' dropdown select 'Custom values' and insert your custom values "2014,2013 etc." So in this case you don't need any JS and virtual fields. As for the other cases, best solution is described in MayMusic's post
  7. Hi NarayanJr, Try this: <a id="mylink" href="http://culex.ca/client-portal/administration-login/forms-and-reports/adult-and-species-id-form?cbResetParam=1&TPSampleID=" onclick="javascript:window.open(this.href, 'mywin','left=20,top=20,width=1100,height=800,resizable=0'); return false;"target="_blank">Click here to Open Species Form</a> Is this what you need?
  8. Insert code into the footer of the DataPage <script type="text/javascript"> v_a = document.getElementById('YOURFIELDID'); if (v_a){ v_a.onchange = function(){ v_a = document.getElementById('YOURFIELDID'); document.location = v_a.options[v_a.options.selectedIndex].value; } } </script> And replace YOURFIELDID with correct dropdown field id. So if you insert this JS in to the Footer of your DataPage and select some value in the dropdown (YOURFIELDID should be replaced with dropdown id), you will be redirected to the selected value (correct URLs should be used as dropdown values). NOTE: This JS doesn't work in the DataPage Preview and iFrame deployment because of iFrame security
  9. Hi, Replace single quotes with double quotes in these rows: var X='[@field:Event_Name_Override]'; var Y='[@field:Event_Name]'; Let me know if this helps.
  10. Hi, This is not default Caspio feature, but theoretically it's possible. With JS you can open popup dialog with filtered form and print this page. But seems it's a complicated solution.
  11. ShWolf

    Data Validation

    Hi Heisenberg, One-to-many relationship with 'Enforce referential integrity' option seems can help you (http://howto.caspio.com/tables/table-relationships.html).
  12. Hi, You can use CSS on the page to customize filter area To configure "Filter By Category", insert: #filterHeader { … Your CSS here, as example: color: red; } To configure filter elements, insert: #filterTable td { … Your CSS here, as example: font-weight: bold; background-color: gray; } Hope this helps.
  13. ShWolf

    Ldap

    Hi, It's impossible to integrate LDAP authentication with Caspio. You can request it as feature request.
  14. Hi JRoss, In your case MemberID in the second DataPage static value? Or it will be dynamic value? You can try to use external parameter. In first DataPage for the MemberID field select "Pass field value to the next page" on Advanced tab. In second DataPage replace [@field:MemberID] with [@MemberID] NOTE: Check that parameter name is the same in both DataPages Let me know if this helps
  15. ShWolf

    Get Chart Values

    Hi theconav, Seems it's a bug. You can report it to the support team.
  16. ShWolf

    Get Chart Values

    Hi theconav, Try to use single quotes with static value: SELECT SUM(Points) FROM Points_Table WHERE Audit_Entity='XX' Seems this works well
  17. Hi, Clicknip As I can see in the Caspio Idea Box (http://ideabox.caspio.com/forums/164206-caspio-bridge/suggestions/2905340-calculated-field-to-be-stored-in-table), table-level calculations and formulas are in the road map for future releases. I think this feature is what you need. Until this feature is released, the only way is to create new column in the table and insert age for each record (or you can do this in Excel via formula and then import this excel table to the Caspio)
  18. Hi, Michael You can use custom css styles on your page or use jquery html selector .style
  19. Hi, waltmayo It's not clear what exactly should be in your case. Can you provide some details, please. If you want to get a RAW data from the DataPage, then it's not possible now. You can post an idea in the Caspio Idea Box (http://ideabox.caspio.com/forums/164206-caspio-bridge)
  20. Hi theconav, Please try the following code. Remember to substitute field names and ids with the ones you used when creating your form. Let me know if this helps! <script> var setCurrentStatus = function(status) { document.getElementsByName('EditRecordCurrent_Status')[0].value = status; } document.getElementById('caspioform').onsubmit = function() { var assignedAE = document.getElementsByName('EditRecordAssigned_AE')[0].value; var closeDate = document.getElementById('EditRecordClose_Date').value; var today = new Date(); today.setHours(0,0,0,0); if(assignedAE == '-None-') { setCurrentStatus('New'); } else if(closeDate == '') { setCurrentStatus('Assigned'); } else { closeDate = new Date(closeDate); closeDate.setHours(0,0,0,0); if(closeDate > today) { setCurrentStatus('Scheduled'); } else { setCurrentStatus('Performed'); } } } </script>
  21. ShWolf

    Conditional Sorting

    Hi, Yes, you can add a "Preferred" column to the source table. For the records you want to see at the top of results, insert value "1". For all other records put value "2". Edit your DataPage and on the 'Search Results Options' page select "Preferred" field in the first sort order dropdown (set sort order from A to Z) and in the second dropdown select your field with price (set sort order from Z to A) Let me know if this helps.
  22. Also works fine in IE8 and IE9.
  23. Hi, How many DataPages did you use? And which types? Did you use Search and Report, Submission form and pre-defined Search and Report?
  24. Hi, Script (1) quit working because Script (2) submit form in the moment when the form loaded, so the Script (1) doesn't have time to work Insert following script into the footer <SCRIPT LANGUAGE="JavaScript"> window.onload = function() { var position1 = document.getElementById("EditRecordLast_Name").value; var position2 = document.getElementById("EditRecordHOH_ID").value; var allpositions = position1 +" ID:" + position2; document.getElementById("EditRecordStudent_Last_Name_ID").value = allpositions; document.getElementById("caspioform").submit(); } </SCRIPT> Let me know if this helps.
  25. Hi, It can only be done in JS. In case you have difficulties implementing javascript code, you can try to contact the Caspio support.
×
×
  • Create New...