Jump to content

MayMusic

Caspio Evangelist
  • Posts

    1,510
  • Joined

  • Last visited

  • Days Won

    78

Reputation Activity

  1. Like
    MayMusic got a reaction from telepet in Grid edit by default   
    You can try to change the style to:
    <style> .cbGridCtnr > .BodyCtnr > .Table{ width: auto; } .cbGridCtnr > .HeadCtnr > .Table { width: auto; } </style>  
     
  2. Like
    MayMusic got a reaction from subraasingapore in Hiding columns including aggregation rows in Datapage   
    I cannot replicate this issue I used the code just instead of
    nth-of-type(2)   I have
    nth-of-type(1) and it is hiding the aggregation as well. What is the URL to your page?
  3. Like
    MayMusic got a reaction from karikounkel in Select multiple values from a listbox in a update DataPage   
    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>
  4. Like
    MayMusic got a reaction from lmooring in Change A Form Field Value On Submit   
    You can have a script that calls a function on submit to check the box
    <script> document.getElementById('caspioform').onsubmit = function (){ document.getElementById('CHECKBOXID').checked="True"; } </script> Code can go to the footer of the page and "CHECKBOXID" needs to be replaced with actual element ID.
  5. Like
    MayMusic got a reaction from MBhalli in Changing Background color of a radio button   
    The ID of a radio button does not seem to be correct. Refer to
    It should be something like, InsertRecordMetalic_Injury0, InsertRecordMetalic_Injury1 ....
    Also you do not need == true
     
    <script type= "text/javascript"> function ValueChanged() { alert("Function Called"); if(document.getElementById("InsertRecordMetalic_Injury0").checked){ document.getElementById("InsertRecordPrior_Surgery0")0.style.background = "yellow"; } document.getElementById("InsertRecordPhone").focus(); } document.getElementById("InsertRecordPrior_Surgery0").onclick= ValueChanged; </script> But I am not sure how to change the background color
  6. Like
    MayMusic got a reaction from TWIRED in Select multiple values from a listbox in a update DataPage   
    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>
  7. Like
    MayMusic got a reaction from TWIRED in Questions A Bundled   
    1) How Can I Change the Default "View Details" link to just "Details"?
     A: Edit the localization you are using for this page, under Results Pages >> Record Actions >> Element find view details and change the custom text
     
    2) Grid Edit - How Can I Make the tables NOT shrink and get squishy when I Click "Grid Edit" :
    A: Add Header to "Configure Result Page Fields" screen and use the code below:

    <style>
    .cbGridCtnr, .BodyCtnr, .Table {
    width: 100% !important;
    }
    </style>
  8. Like
    MayMusic got a reaction from TWIRED in Can I Import From Excel File Through Datapage   
    If you want them to feed the table without having access to Caspio you can request for datahub which is a scheduled import/export task. User can put the file somewhere like a FTP site and Caspio can be programed to run for instance every hour to import the data. Using this feature you can either replace the table or append the data to the table
     
    If you want to let them update certain records then you can try web services http://www.caspio.com/extend/platform-extensions/web-services.aspx if you know programming.
  9. Like
    MayMusic got a reaction from NealPatil in Intractable Problem In Views   
    You need to have a third table which keeps VID and CID and there has to be another field (CombinedVCID) to keep the combination of these two. Since there can be only one matching this field should be unique.
     
    Then in your report include CombinedVCID and filter your report with this field to find Does not Contain and receive VID from authentication.
  10. Like
    MayMusic reacted to LWSChad in Conditional Formatting Trick   
    Check out this trick I stumbled upon.
     
    Put Caspio Variables into your Classes so you can use CSS to dynamically style your pages.
    (js not required)
     
     
    Div to dynamically format 
    <div class="action[@field:action]"></div> css
    .actionCall { background-image: URL("../img/call.png"); } .actionEmail { background-image: URL("../img/email.png"); } .actionText { background-image: URL("../img/text.png"); } Dynamic Elements - load all options, and hide all but needed
    <a class="btnFile fileName[@field:FileName]" href="../some/dir/[@field:FileName]">Download</a> <a class="btnLink fileLink[@field:FileLink]" href="[@field:FileLink]">View File</a> css
    /*-- when [@field:***] is null, hide the div --*/ .fileName, .fileLink { display: none; } Hope this helps
     
    Think Easy
    CHAD
    -I know the Title of this Forum is "Ask....", but IDK where else to share stuff like this.
  11. Like
    MayMusic got a reaction from TWIRED in Page redirecting to another page inside the embedded frame   
    Sure you can get iframe deploy code and add it to the footer of submission page (search page). Along with the source URL of the frame you need to pass all parameters to the frame:
     
    <iframe name="Web_Order" title="Web_Order" src="https://b15.caspio.com/dp.asp?AppKey=c82222022027df1c5e22223e1&id=[@id]&Name=[@Name]&email=[@email]">Sorry, but your browser does not support frames.</iframe>
  12. Like
    MayMusic got a reaction from satch in Calculate field in Datapage, getElementByClassname   
    https://developer.chrome.com/devtools
    http://getfirebug.com/
  13. Like
    MayMusic got a reaction from ray in Show icon based on time difference   
    Lets say you have two date fields called Date1 and Date2 also a unique field for each row called Id
     
    <div id="show[@field:Id]"></div> <script> var d1 = new Date('[@field:Date1]'); var d2= new Date('[@field:Date2]'); var hourDiff =d2 - d1; var minDiff = hourDiff / 60 / 1000; if (minDiff < 30){ document.getElementById('show[@field:Id]').innerHTML = '<img src="http://someapp.com/nk/icons/greenstar.png" width="100px"/>'; } else if (30<minDiff && minDiff <120 ){ document.getElementById('show[@field:Id]').innerHTML ='<img src="http://someapp.com/nk/icons/redstar.jpe" width="100px"/>'; }else if (minDiff >120){ document.getElementById('show[@field:Id]').innerHTML ='<img src="http://someapp.com/nk/icons/yellowstar.jpe" width="100px"/>'; } </script>  
  14. Like
    MayMusic got a reaction from telepet in Auto-populate a blank column in a newly imported table with an App parameter   
    This is not possible in Caspio platform, unless you write a trigger to add the value once there is a new entry to the table. It is easier if you do it in Excel and them import the complete sheet to Caspio
  15. Like
    MayMusic got a reaction from LyaP in Select Multiple Values from Listbox in Update (Multiple Listboxes)   
    Try this
     
    <script type="text/javascript"> var mylist= new Array ("EditRecordStatus","EditRecordMarket_Sector","EditRecordDivisions") ; var v_state = new Array ("[@field:Status]","[@field:Market_Sector]","[@field:Divisions]") ; for (var k=0; k<mylist.length; k++){ var m = document.getElementById(mylist[k]) ; var o_state = document.getElementById(mylist[k]); m.multiple = true ; f_listbox(); function f_listbox() { if ( v_state[k].indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state[k]) { o_state.remove(i); break ; } } var o_st = v_state[k].split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } } </script>  
  16. Like
    MayMusic got a reaction from aam82 in Disable Submit Button if checkbox value is "Yes"   
    You can have this code in Footer of your update page:
     
    <script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script><script>
    if (document.getElementById('EditRecordApproved').checked){
    document.getElementById('Mod0EditRecord').style.display="none";
    }
    </script>
    <script> if (document.getElementById('EditRecordCHECKBOXFIELDNAME').checked){ document.getElementById('Mod0EditRecord').style.display="none"; } </script>  
    Replace CHECKBOXFIELDNAME with the actual field name
  17. Like
    MayMusic got a reaction from telepet in Does View update itself if source Table design is changed?   
    Each time you open a view or call a view via DataPage, view is making a call to table to filter the data. Therefore the data is being generated on each call so data is updated. But as for the design as it is mentioned above newly added fields should be available in the wizard but they need to be included (by default they are not included in view).
    You also have the option to change the name of the fields in the view to make them shorter. By default you have TableName_FieldName if you change table name part and leave "_" by moving to next field system will ask you if you want to have the same naming for other fields as well to change them all at once
  18. Like
    MayMusic got a reaction from JEllington in Cascading dropdown from non-editable parent field?   
    If you want to show the parent value you can add HTML Block or virtual field and select the field there
  19. Thanks
    MayMusic got a reaction from vanderLeest in Combine 2 fields into 3rd on Inline Insert   
    I tried this code and it worked for me
    <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var CompanyID = document.getElementsByName("InlineAddRed")[0].value; var Area = document.getElementsByName("InlineAddGreen")[0].value; var CompanyID_Area = CompanyID + Area; alert(CompanyID_Area ); document.getElementsByName("InlineAddallcolor")[0].value = CompanyID_Area; } document.getElementById("Mod0InlineAdd").onclick=concatenate; </SCRIPT>  
  20. Like
    MayMusic got a reaction from JEllington in Some Parameters Doesn't Show and Also show older data?   
    HAHA you were expecting me to reply You also know I am always online  Thanks for updating the post
     
  21. Like
    MayMusic got a reaction from telepet in Reset button on Search Form does not work as needed   
    Button code would be
    <input type="button" onclick="window.location='[URL_for_my_search_page]'" value="Reset Search"/>  
  22. Like
    MayMusic got a reaction from Eduardo in Button for adding fields   
    You should include all in your page and then based on user selection hide the ones that are not selected, There has to be a virtual dropdown where they select how many areas they want, and then add rules: so if value is greater than 4 hide 5, greater than 3 hide 4, greater than 2 hide 3 ....
     
    http://howto.caspio.com/datapages/forms/conditional-forms/
    try this and see how it works !
  23. Like
    MayMusic got a reaction from virtualHITman in Reset button on Search Form does not work as needed   
    Here is the code to create custom search again
    <a class="cbResultSetSearchAgainLink" href="URL"><img alt="Search again" src="https://c0cmr140.caspio.com/images/dp/SA_magnifier.png" style="vertical-align: text-bottom; border: 0px;" title="Search again" /> Search again</a>  
  24. Like
    MayMusic got a reaction from peterhanse in parameter (date) from searchpage to result page   
    Thanks for sharing
  25. Like
    MayMusic got a reaction from telepet in using a dropdown with the Inline edit in Search Report?   
    In inline edit you have option to choose form element as well, click on Editing tab and change it.
×
×
  • Create New...