Leaderboard


Popular Content

Showing most liked content since 06/26/2017 in all areas

  1. 1 like
    I have a virtual field in a submission for. My input in that virtual field is comma separated values. What I want to achieve, is upon submitting the DataPage, the value will be separately into my table fields. Example: Table fields are Name, Age and Gender Virtual field Input: Nelson, 50, Male Expected outcome: Nelson is stored in the Name field 50 is stores in the Age field Male is stored in the Gender field
  2. 1 like
    Hi, it can be done using sql substing query in the formula field: SUBSTRING ([@field:First_name] ,1 , 1) + SUBSTRING ([@field:Last_name] ,1, 1) However, in case of further using username field in authentication, this is not the best option since you can using only unique field as a username. Therefore, you may insert the following script in the footer of your submission form. <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var position1 = document.getElementById("InsertRecordFirst_name").value; var position2 = document.getElementById("InsertRecordLast_name").value; document.getElementById("InsertRecordUsername").value = position1.substring(0, 1) + position2.substring(0, 1); } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT>
  3. 1 like
    I have a few zaps that pull information between Shipstation (http://www.shipstation.com/) and a table in Caspio. However, when the data is pulled in, a few columns are blank (storeid, item sku, and item name...all info that shipstation gets from shopify, although most shopify data is brought over, just not these fields). My work around is using a zap to a google sheet, then another zap to caspio. I'm not sure if the data type isn't compatible or what, but I can't imagine that they aren't in a text format....because the storeids are alpahnumeric and the item names wouldn't be anything but text, right? The REAL issue with the work around is that the Shipstation to Caspio zap uses polling or maybe a webhook (I don't know how the zaps work tbh) to instantly update the caspio tables...which is what I'd prefer to do instead of waiting 5 minutes for the zap run (paid account). Has anybody encountered an issue similar to this? Any ideas of what could be happening and if there's something I could look at in my tables to try and fix this? Thanks in advance!
  4. 1 like
    I also added a condition to check that fields are not blank. You need to use your field names instead of mine. <SCRIPT LANGUAGE="JavaScript"> function check() { var COMPLEXUNITS= parseFloat(document.getElementById("InsertRecordCOMPLEXUNITS").value); var SIMPLEUNIT = parseFloat(document.getElementById("InsertRecordSIMPLEUNIT").value); var PACKTYPE = document.getElementsByName("InsertRecordPacktype")[0].value; if( PACKTYPE =='Simple' ) { if (SIMPLEUNIT !=1 || typeof SIMPLEUNIT == 'undefined' || !SIMPLEUNIT || SIMPLEUNIT.length === 0 || SIMPLEUNIT === "" || !/[^\s]/.test(SIMPLEUNIT) || /^\s*$/.test(SIMPLEUNIT) || SIMPLEUNIT.replace(/\s/g,"") === "" ) { window.alert("Value in the SIMPLEUNIT field should be equal 1"); return false; } } else if (PACKTYPE =='Complex'){ if ( COMPLEXUNITS <2 || typeof COMPLEXUNITS == 'undefined' || !COMPLEXUNITS || COMPLEXUNITS.length === 0 || COMPLEXUNITS === "" || !/[^\s]/.test(COMPLEXUNITS ) || /^\s*$/.test(COMPLEXUNITS ) || COMPLEXUNITS .replace(/\s/g,"") === "") { window.alert("Value in the COMPLEXUNITS field should be grater or equal 2"); return false; } } } document.getElementById("caspioform").onsubmit=check; </SCRIPT>
  5. 1 like
    As far as I know, it's not possible to convert any datatype to string. It's a new datatype and hope conversion capability will be added soon.
  6. 1 like
    I address it this way: I have a few Caspio user classes, say user, superuser, admin. All datapages that use the "user" authentication, are embedded on wordpress "User" template-based Pages. The User template, in turn calls a specific WP "User" menu. So I have 3 authentications, 3 Page templates, and 3 menus. Finally, and I'm embarassed to say it: since these WP menus are NOT behind Caspio authentication, public users who guess a URL of one of your pages could see the menu, but obviously not the datapage embedded on the page. Still, I don't like that, so I have a script that looks for a DIV in my authentication form, and if present, hides the WP nav with CSS. Pretty nasty, and not really that effective, but it beats using 3 Caspio datapages for 3 menus.
  7. 1 like
    If you have more than one listboxes on your details or update user this code <script> // Function for selecting corresponding elements from the list box. function select_ (){ // get listbox element var o_els = new Array("EditRecordFIELDNAME","EditRecordFIELDNAME2","EditRecordFIELDNAME3"); for (var k=0; k< o_els.length; k++ ) { var o_el = document.getElementById(o_els[k]); // Enable multiselect for listbox o_el.multiple="multiple"; // get listbox length var len = o_el.options.length; // get selected element var selected = o_el.options[len-1].value; // verify if selected element contains comas, if yes, do the following if (selected.indexOf(",") != -1 ){ // Split selected option into array var m_array = new Array();m_array=selected.split (","); // Delete last option from the listbox o_el.options.remove(len-1); // Go through listbox and select each option, if it is present in array for( var i=0; i< m_array.length; i++ ){for( var j=0; j< len-1; j++ ){ // Trim spaces while comparing elements from array and listbox if( m_array[i].replace(/^s+|s+$/g, '') == o_el.options[j].value ){ o_el.options[j].selected = "selected"; } } } } } } // call select_ funtion when details page is loaded window.onload = select_; </script>
  8. 1 like
    John: I followed your directions and that worked. My multipage form question is a bit different: - I don't need the 2nd page of the form to be authenticated. My new member registration includes 3 pages: 1) Page 1: general account and user info form 2) Page 2: additional fields if user elects to upgrade membership (the user shouldn't have to log in to access this form 3) Page 3: preview page, which should include all the field data from Page 1 AND -- if the user enters data on Page 2 -- all of the field data from Page 2. On Page 3 the user will be presented with two buttons: Back (to make edits to Page 1 or 2) and Submit (to complete the member registration). I'm also not sure how to redirect the user based on the fields displayed in the Preview page. If a user doesn't elect to \"upgrade\", then the Submit button on the Preview page should take the user to a Thank You page. If the user does \"upgrade\" then I want the same Submit button to take the user to my PayPal form to pay for the upgrade. Any and all help will be most appreciated. I've searched through the Help docs and didn't find any info on how to do this.