Popular Content

Showing most liked content since 03/01/2017 in all areas

  1. 1 like
    I have a submission form where there's a choice aside from the normal 'submit new record' function (that's available too but the user can also go this other route). There is a Virtual Field that is a List Box. The user can select a single record from this List Box (not multiple records) and then click a button (not the Submit button) to go to a different datapage. I need to pass the Value of the Virtual List Box as a parameter in the button's url link but don't know how to 'save' that value on the Virtual Fields' 'change'. Does anyone know how to use the Virtual field's current value (probably using a variable from 'on change'?) as a parameter in a url? In this example Virtual 1 is a List Box that stores a numerical unique ID value for the selection. I need to pass that in the url as a parameter. <div style="text-align: center;"><a href="../mypage?ExampleID=[@cbParamVirtual1]&otherfieldID=[@otherfieldID]" target="_self"><input class="cb_custom_btn" type="button" value="LINK" /></a></div>
  2. 1 like
    Try adding a condition before concatenation. Use my code instead of this part: document.getElementById("InsertRecordemailstosend").value = x1+" "+x2+" "+x3+" "+x4+" "+x5+" "+x6+" "+x7+" "+x8+" "+x9+" "+x10+" "+x11+" "+x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; if (document.getElementById("cbParamVirtual1").checked==true) { document.getElementById("InsertRecordemailstosend").value = x1+" "+x2+" "+x3+" "+x4+" "+x5+" "+x6+" "+x7+" "+x8+" "+x9+" "+x10+" "+x11+" "+x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; } else{ document.getElementById("InsertRecordemailstosend").value = x12+" "+x13+" "+x14+" "+x15+" "+x16+" "+x17+" "+x18+" "+x19+" "+x20; }
  3. 1 like
    I thought this might be helpful across the board for people developing in Caspio. I've been trying to do a better UI for data entry on web pages that also have to show results in a tabular report. Since iframes don't reliably pass parameters from parent to child and back it's necessary to sometimes deploy 2 datapages (a Submit or Details and a Tabular) on the same web page. This doesn't really look good from a UI perspective. This solution requires using bootstrap and jquery but it's fairly straightforward. One option is to put the the Submit/Details deploy code in the first div with something like class="col-md-3" and the Tabular deploy code in the next div with class="col-md-9" (divs in bootstrap with col classes must add up to 12 but no more than 12, in basic mode). This will put the 2 datapages next to each other, the 1st with 1/4 screen width and the 2nd with 3/4th. However, this setup looks cluttered and can constrain the Tabular report which often needs full page width to show its data clearly. So the ideal would be to onload hide/collapse the first div (with the Submit/Details form) and have the second div (tabular report) a full 12 columns wide. Then click a button or link to show the 1st div (Submit form) and change the 2nd div (tabular report) to 9 columns, thereby displaying both datapages when data entry/edit is needed. Clicking the button/link again (in this method) will collapse div1 and expand div2 back to 12 columns. So it's easy to toggle views this way. To do this: Put this in the body of your webpage (you may have bootstrap and jquery referenced differently): <div class="container-fluid"> <br> <div class="row"> <div class="col-md-3 bg-faded"> <div id="showsubmitform" class="collapse"> Caspio Deploy Code for Submit/Details form </div> </div> <div class="col-md-12" id="right"> <div> Caspio Deploy Code for Tabular Report </div> </div> </div> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script> $('#btnSwitch').click(function(){ $('.col-md-3').toggleClass('show'); $('#right').toggleClass('col-md-9 col-md-12'); }) </script> And then put a button or link elsewhere on your page, wherever you want to show it: <a class="btn page-action" id="btnSwitch" href="#showsubmitform" style="color:green;" data-toggle="collapse"><i class="fa fa-plus" aria-hidden="true"></i> Submit New Data</a> When the page is loaded the Tabular Report will be the only datapage showing, in full width. When the 'Submit New Data' link is clicked the Tabular Report moves to the right and shrinks to 9 columns from 12. The space that opens on the left is 3 columns wide and will now show the Submit/Details form. When the 'Submit New Data' link is clicked again it will hide the Submit/Details form and expand the Tabular Report back to 12 full columns. You can change the column numbers of the divs and button ids and labels to suit. This solution might help with some UI massaging, if anyone is working on that aspect of their app...
  4. 1 like
    You need use EditRecord syntax before field name, in my code the following name EditRecordapproved means that the EditRecord is a part of syntax and approved is a name of the field. So you need to insert your field names instead of mine, do not remove EditRecord. Also make sure that you hit "Source" button before inserting code in the footer.
  5. 1 like
    Hi Mark, I found out the following solution. I suppose that you have a submission form. Create a separate lookup table and for each value in radio button assign needed value. E.g. field1 field2 value1 A value2 B Then make hidden field to be cascading text field, use radio button field as a parent field, use recently created table as a datasource, also filter values on field1. I'm attaching a screenshot. If you need to hide cascading field, you may do that using html blocks.
  6. 1 like
    Hi Gregory, when setting up a Comperison type as "Begins with", you are still able to define the Range start and the Range end. So this might be just a temporary issue with the name of this option in comparison type. See the screenshot. http://screencast.com/t/mppex3aFD