Jump to content


Caspio Ninja
  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by gsgriffin

  1. I've developed an application which would benefit by using the API, but the instructions given are not a great way for me to learn.  Having instructions that say, "Just do this and then that" is missing the whole point of how and assuming those reading are professional programmers that do this all day for a living.  Those of us who are self taught are left to do a lot of work trying to figure it out.  I learn best by just seeing code and understanding what it is doing and then adapting to my needs.  Wondering if anyone might be able to post a little code to help?

    All I need is an API code where I can send it the table, Row Id, field, and value and have that update in the table.  I don't need Gets. I realize that doing all of this from Javascript is not a good idea with the with the client key being exposed (but OH, how that would make my life easier and faster).  So, PHP on the server is my only other option, I suppose.  I've already set up and have the account permissions.

    Could I ask that someone kindly just post an example PHP which would receive the needed values posted from the URL and do the action of updating a table field?  My Javascript can post all the needed values in the URL call to the PHP.  I can modify it from there to hide details a little better so it isn't obvious enough for someone else to simply make direct calls to the PHP.  If I'm going about this the wrong way, feel free to offer a different solution, but some code example would really be helpful as opposed to telling me the better way.


  2. There was never a good solution to this, but I finally came up with this...in case someone else needs to run scripts making sure all cascading fields are loaded.

    I tend to have a default value in dropdowns and will always have at least one other option available.  If you have cascading that may not have an additional value loaded, this may get stuck.


    var notDone;
    function saveValue(){
        if($(this).children('option').length<2);//This count works so long as you have 2 or more options always
         var currentVal=$(this).val();
         if(typeof $(this).val()!="undefined" && $(this).children('option[value="'+currentVal+'"]').length==0) {
          console.log("No option yet:"+currentVal);
       console.log("Not done!!! waiting");
       setTimeout(saveValue,500);//can decrease the time if you want it to check more frequently
       return false;
     console.log("All options loaded");
    ...........your waiting scripts here


  3. I know this is very old, but it came up in a Google search for a topic similar to what I do.  I submit forms all the time without leaving the page.  I like to turn my Caspio forms into an instant storing off values as field change or after they stop typing for a textarea.

    In short, without going into extreme detail (which it would take and perhaps MayMusic understands this and can take the time), I do this:

    1) create a hidden iFrame in the footer of the form

    2) I use jQuery and when a field has changed (or after a delay of change for the textarea), I get the value and the field NAME that has changed.

    3) With the value and fieldname, I create a URL for the iFrame that sends both the fieldname and the value to the very same form you already have loaded.

    4) Scripts on the form look for the incoming fieldname and value.  If it see those, it will change the current value for that field and then submit the form in the hidden frame.

    Do remember to hide the Submit button and don't use Caspio's default submit functions.  You will also start an eternal loop of submissions to this hidden form unless you make a test.  I end up first testing to see if the value of the field desiring an update matches the existing value or not.  If it doesn't, then submit.  If it matches the existing value, you may have submitted the form already.  

    This is a little heavier in data and time.  Large forms and slow internet can be a little more challenging, but all of my forms are now auto-submit to hidden forms as changes are made.  Nobody complains.  This is more common on the Internet today.  People are used to it.  Caspio should make it a feature.

  4. I have many cascading and non-cascading dropdowns in a form.  I would like to execute a script once each and every dropdown is DONE loading.  The script I was to attach to all types of dropdowns will be triggered by CHANGE.  If I attach this before the cascading is complete, the new script will be executing each time a cascading option is added to the dropdown.  I only want the new script to execute AFTER all OPTIONS for the dropdown have been loaded....cascading or not.

    As I test this, I have my script currently inside

    document.addEventListener('DataPageReady', function (event) {

    which should only execute after the page is ready.  However, it appears to execute before all of the cascading fields have finished.  I'm hoping that I don't have to attach a custom event listener for each and every dropdown but rather there is a way to have an evenlistener from Caspio that is when the page is REALLY ALL COMPLETELY DONE AND READY.

    Does this exist?

  5. I'd rather not. 

    Just imagine a Caspio report datapage, which it is.  There is no wireframe.  Just a single report. 

    It is not a problem to create the conditions for the report be matching a single value or greater than or less than an input value (or partial match on text).  Typically, you have a single input value and the report gives us all results on that condition.

    I'm trying to get a result where I can pick and choose values....multiple matching in a single report on a single field.

    Perhaps this will help.


    ID     whatever   whatever whatever
    1       asdfsdf        asdfasdf     asdasdf
    2       asdfasdf    asdfasdf    asdfasdf
    3    asdfsdaf   asdfasdf       asdfsdaf
    4   asdfasdf    asdfasdf     asdfasdf
    5   asdfsadf  asdfasdf    asdfasdf

    How can I get rows 1, 3 and 5, by matching the values of ID itself?  There is no other way to match the rows.

    I'm trying to avoid combining the results of the report being run over and over for each instance to give me one result.  ie. run report for ID=1 and then run report for ID=3, etc... then combine into a single page....yuck

    I was hoping I could create my list of ID to be something like "-1- -3- -5-" as my input matching string to the report. I then created a formula in the table so the last field in each row is the ID with hyphens before and after.  So, row with ID of 3 also has a field at the end that is "-3-".  I was hoping I could create the query match in the report to be finding -1- within the input string of "-1- -3- -5-" and with the match, return that row.  Repeat for all. 

  6. I hope I can explain this clearly.

    I have a value in a string like "-121- -245- -51- -111-"

    These could be changed and don't have to be in the format... I need to have a report that shows values from the rows in a table where those numbers are the autonumber assigned the row. So, I want the report to have 4 listed items, 121, 245,51,111

    I've tried doing a formula to add "-121-" to each row in hopes that I could do "contains" for a match, but that is not an option.  I know I could have all items come in the results and use JS to remove those I don't want.  Worst would having to go through a relay page (php), to get the datapage, parse the values and then pass those on.  This report must be in a iFrame for a page that does not reload.

    Basically, this is using values stored in cookies as favorites from the report pages and then want to give the ability to only show the items marked as favorite.

  7. Hunting and testing and trying.  ..  not finding....I would like to have a new submission form  that goes to a "display message".  That page needs to receive all of the posted values from the form in JS, but I would REALLY, REALLY like to avoid having to individually load each value using [@valuename].  I've been trying without success and don't know if these are passed or available or only loaded server side from Caspio, but my message being displayed is only going to be a relay to send values  and load a separate datapage in a different iFrame.  There is more post-processing that I need to do  with those values.

    The reason for all of this is that  I have a new submission form that I want to pass all the values to a separate datapage that is a report.  The affect is to have a form for a  report, but I'm storing each "report form" in a table  as well.   That way, we have a record of each report that was run.  If there is a different way to go about this, I'm interested.  Would really love to not have the entire page refresh with each question and can only think that the New Submission form going to a Response Message with javascript that reloads the same form and also send all values to the report datapage at the same time.

  8. For clarification....code should execute immediately after the page is completely done loading and all cascading fields have finished the initial loading.  My case scenario is a page that receives an external value that is passed to a hidden virtual field.  That hidden virtual field is the cascading dependency that many other cascading fields are waiting to change upon.  They are all hidden, but provide the values I need for my script to act upon.  I need to wait for all of the cascading fields to have completely loaded and then begin execution.  There are a lot of variables in download speeds, that I have experienced, that can change the time it takes. 

    It could be me, but the cascading fields don't always seem to update in order.  Don't know if there are variables in connection speed or size of the request and database speed.  Everything is always sequential?

    Especially when you have cascading drop-downs and different lengths and lots of them.  I was hoping that there might be a Caspio event trigger that might be made available to tell us that there is no more loading of anything at the initial page load.  I do realize that cascading can change and force a change to a field later, but the initial load, initial cascade completion is what I'm looking for.

    Your code is fine if there is a guaranteed change on load.  If there is no cascading change, then it is not going to trigger.

  9. Not finding what I need.  I need to wait for form datapage to finish loading all of the cascading text fields before running the script.  I have a lot of cascading fields, so I cannot simply rely upon a trigger to fire onchange for the cascading field.  Does Caspio have any event trigger that can confirm all loads are finished for all cascading fields?  When loading, it should know how many fields are async getting information and it is waiting for a reply to update those fields.  Would be great to have an event listener that can tell me ALL CASCADING FIELDS ARE DONE UPDATING. 

    FYI...DataPageReady listener DOES NOT wait for cascading fields.  It fires as soon as the initial HTML is loaded.  Cascading is async and can be completed several seconds (or more) as the page is "fully loaded".

    Please do not suggest a timer to wait for a few seconds.  That doesn't work well, is poor programming, doesn't take into consideration different processor, browser, and internet access speeds and can cause people to wait for 10 second for a page load....the worst! I believe this will have to be a Caspio event listener.  Just can't find it in docs.

  10. 1 hour ago, Alison said:

    Hi @gsgriffin,

    Have you tried to create one field and make it hidden with the default value and use HTML block or Calculated field to display this value?

    Alison, This is not a problem with displaying a value.  It is a challenge in trying to enter a default value in the saveable fields that will post to the table.  Try this so you understand what I am asking:

    1) Create a small table with a couple fields.  Enter data, if you like.  Make the first field in the table called, "AID" as an example.  This is NOT a field to be generated automatically (autonumber).  This is a number that will connect the relationship with a different table.

    2) Create a datapage tabular report and make sure it is given the ability to GRID EDIT and the ability to INLINE EDIT and ADD RECORDS.

    Run the report and enter grid edit mode.  Now, what I need, is to pass along an external value for the AID in the filter for the report results.  No problem, Easy.

    Now, in the display, all of the rows will only show for rows with matching AID.  I want everything new entered while looking at the report should also always have the same AID.  That is fine on the inline edit mode.  I've scripted for that.  It can make sure the AID cell is automatically populated with an insert.  I can also script for that to ensure it stays the same AID.

    Now, enter GRID EDIT mode while looking at the report.  Looking at the source code, when you enter a row or leave a row, the DOM is dynamically modified, hidden cells are created and taken away, and I'm assuming AJAX is submitted the data for each cell after you leave it (internal API?).  So, in Grid Edit mode, I'm wondering if there is already a function that Caspio provides that would allow for a row to have a fixed value for a field in the table.  It could be hidden (actually best if it is).  The user doesn't know the AID and doesn't need to even see it, but I don't know and can't easily tell if there is a way to force that value WHILE IN GRID EDIT MODE.

    The Grid Edit is a nice tool for the end user, but since I can supply the table relationship connecting value for them automatically, I can't use grid edit and have to use the clunky standard report with edit, delete and empty fields for adding.

  11. I really appreciate and can typically quickly figure out how to use a tool or function based on an example.  A few seconds studying an example is worth far more than a thousand words trying to describe it. 

    I've been looking and not finding, but perhaps not searching for the right term?  Where are there examples of using the REST or SOAP API in JAVASCRIPT for sending data to or getting data from the table?  I would really like to use this, but the descriptions in the help don't get to the actual script examples.  Spending a lot of time in trial and error trying to get it to work.  Prefer Jquery, if this is easier.

  12. The desire is to have one of the editable cells (a cell that is storing a value in the table upon edit of the row) have a default value.  When you add a new row, none of the cells that are editable can have a default value.  I've figured out pretty easily how to do this when NOT in Grid Edit, but in Grid Edit mode, there is a dynamic change to each row when entered and then a storing of the values that appears to be AJAX.  I need to be able to have a default cell value that is stored to the table when a new row is being edited or created. 

  13. I would like to have Grid Edit by default view with a default value in one cell for each row added (and not user editable).  Each row edited and added to the Grid Edit needs to have this common value for the table relationship.  Before I waste a lot of time trying to reverse engineer what they are doing dynamically when each row is being edited, would be nice to know if there is already a known way to do this.  Grid Edit is a great feature, but to not be able to enter a default value in either the configuration or the actual fields really reduces this overall functionality and forces the user to enter all values, unless I am missing something....like posting the value from the placeholder.

    This is easy to do when NOT in Grid Edit, but the dynamic nature of taking a value and setting it somewhere hidden 

    This is not a display challenge.  The default value needs to be for a field in the row that is to be saved with the row....the editable cells, not a viewing cell with a calculated value, unless the calculation can be saved in a field for the table when the row is edited.

  14. 9 hours ago, Vitalikssssss said:

    Hi @gsgriffin,

    This behavior makes me think that some users disabled third-party cookies in their browser settings. 

    Hope this helps.



    No, That would bring up the Caspio error when the form first loads that states that the person must have cookies enabled.  The person loads the auth form and submits it only to be immediately returned to the blank auth form and no error.  This happening with different people only on Chrome and only within the past few weeks.

  15. Some users have recently been reporting that they can no longer log in using Chrome on all of their devices.  Works with other browsers, but something is being blocked or not passed or at least shared between their computer, tablet and phone while trying to use Chrome.  It does not produce an error.  It just sends the person back to the login form with no error are submitting.  The solution to this is not to try to have every person change their Chrome settings....most are clueless as to how.  Need to have a solution on our end that gets around this.  Any ideas on the cause?

  16. I still don't see a real answer to this very pesky problem.  Google has autobound and autozoom.  The settings provided in this mashup for autozoom (Y/N) do both autobound and maximum zoom without any override.  What this means is that if I set a single pin on the map, I must use Autozoom.  The result is a maximum zoom level to the piece of dirt.  When I want to you a street view, this often create a blank map with no visible roads and a single pin.  I want to define the max zoom to about 10 or 11 and still be bound on that pin or at least centered on the pin.

    When you change the setting of autozoom to "N", then a map appears centered on whatever place in the world, zoomed in the level I want, but you have to manually zoom way out until you see a pin and then manually zoom in on the pin.

    When providing the lat and lng, why does the map not center on that?  Is there somewhere I need to specify that in settings since it can't figure out that a single point provided is what I want to show?

  17. I have lots of images.  They are uploaded and in a folder, but how is Caspio making it easier to maintain the images?  It just dumps everything into the same folders without allowing to tag or id the image or file.


    I have 180 locations.  Each location can upload several images and those can change.  The Datapage uploads the image and holds it in the current table, but when new images are uploaded, the old sit in the file folder with no identification.  If I'm using another Datapage to select available images from, I can either upload or choose from a folder, but everything gets dumped into the list.  I only want available photos in my dropdown to be for that specific location.


    With Caspio getting more money for data charges for images, I would think there would be a great and easy way to manage images and tag them with more fields and then search and select based on those fields and not just the folder it is dumped into.  Couldn't find any documentation on this.


    Ideas or suggestion on what you have done to manage photos...

  18. I was struggling with the same thing and discovered this:

    The headers are the things that stop you from changing the size of a column because they are forced to no-wrap.


    1. Create a new style specific and for the report you want to make this change for

    2. Assign the style to the datapage for the report

    3.  In the style, go to Result Page > Table Layout > cbResultSetHeaderCell

    4.  In the style, change "white-space:nowrap;" to "/*white-space:nowrap;*/"


    Now the header cell text will wrap into a second or third row if needed and size settings will work for the column width.

  19. I don't think you'll be finding a good solution with Caspio default functionality.  The calendars only allow for the placement based on a single date field.  I would recommend a custom development with an API...basically, custom web page that get the data from Caspio but creates the calendar outside of Caspio.  This will take some advanced technical skills and perhaps integration with a 3rd party calendar web app.

  20. Just did something similar where this might help someone else.


    Create a list report that has the items you want, but hide them all.


    In the header, add "<script type="text/javascript">var count=0;</script>" to start a counter.  If you want to add more values, create more values like "var countX=0;" and such


    Create an HTML block in the Configure Results Page Fields with a script like

    "<script type="text/javascript"> count++;</script>"

    if you want to just count how many come up, in the footer, put


    <script type="text/javascript">
    You can display any combination of any values by adding to the HTML block something like
    Neat trick I just figured out.  Now I'm able to authenticate a URL for visitors based on matching enough variable to a table results.  If they don't match, the report show "0" and the script keeps the important stuff hidden.  If I get something, I display the info.  Validation on the fly without a form.
  21. I'm a newbie.  Been in this for just a week.  Spending a lot of time trying to find where the modify which style for which element.  Using Firebug, I can see the element, but the .cb***** class is not shown.  Just the compiled style is made into a literal style statement. This is great for forcing the style, but it really stinks for trying to figure out which is which.  


    For example, NestTable is used in Layouts for styles.  Would be REALLY GREAT for debugging to be to able to turn on a "Show Class in Code" function that would spit out a simple 'class="formdetail layout cbNestTable" ' so I can figure out more easily where to change the style.  


    Wasting a LOT of time.  I realize this can freak out the style if you are using styles by the same name, but I'm looking for a debug or a map or something to help tie where in the style source I can match up the output.


    Feature request, if not available

  • Create New...