Jump to content


Caspio Guru
  • Posts

  • Joined

  • Last visited

  • Days Won


ShWolf last won the day on August 28 2013

ShWolf had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ShWolf's Achievements

  1. Hello m2367, There are two reasons on why Facebook do not display Caspio datapages: 1) 'Facebook post' displays text content of the page. Script of the Caspio datapages loaded after the main page content. 2) Probably Facebook prevent forms to be posted on the wall. You can send request to the Facebook support team.
  2. 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.
  3. Hello brbbrid, Which localization is used in your DataPage? The script will depend on the format of date.
  4. Hello Artdocent, Insert this code into the Footer of the Calendar result page: <script> window.onload = function(){ try { var v_nodes = document.querySelectorAll('span[class*="cbResultSetData"]'); for(var v_i= 0 ; v_i < v_nodes .length; v_i++){ if(v_nodes.item(v_i).innerHTML.search('pending')!= -1){ v_nodes.item(v_i).style.color = '#f00'; } } } catch(v_ex){} }; </script> Let me know if this helps.
  5. 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.
  6. 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.
  7. 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.
  8. 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
  9. 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?
  10. 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
  11. Hello Patrick, So you need to get user's geo position and put it to the hidden field on the form? Insert this code in to the footer of your DataPage (it's better to past JS code in to the Footer, when you work with data on the form, because content of the HTML block can be loaded before the form was fully loaded): <script type='text/javascript'> if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(GEOprocess, GEOdeclined); } else{ document.getElementById('InsertRecordGEO').value = 'Your browser do not support geo-location.'; } // called when the browser has shown support of navigator.geolocation function GEOprocess(position) { gLongitude = position.coords.longitude; gLatitude = position.coords.latitude; console.log('latitude: ' + gLatitude + ' ; longititude: ' + gLongitude); // update the page to show we have the lat and long document.getElementById('InsertRecordGEO').value = 'Latitude: ' + position.coords.latitude + ' Longitude: ' + position.coords.longitude; } function GEOdeclined() { document.getElementById('InsertRecordGEO').value = 'Your browser do not support geo-location.'; } </script> And replace GEO with your field's name. P.S. Field names will be different on the different form types. As example, on the Submission form you should use InsertRecordYOURFIELDNAME, on the Update form it will be EditRecordYOURFIELDNAME. Let me know if this helps.
  12. 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.
  13. Hi, Which form type do you use? I have to look on your field order on the form. Do you have an example of a DataPage? Or you can post screenshot of the form. And I don't get about the new tables, could you please provide more information. Thanks
  14. Hello, Could you please show on screenshot which boxes are blank? Because I don't see blank boxes in your DataPage.
  15. Hi, This can be done with JS, but it's a complicated solution. You can request it as a custom solution in the support team.
  • Create New...