Jump to content

MayMusic

Caspio Evangelist
  • Posts

    1,510
  • Joined

  • Last visited

  • Days Won

    78

Reputation Activity

  1. Like
    MayMusic got a reaction from wayanmariasa in Field Length   
    This is possible by setting fixed width for results page label and data elements in the style. To do so, follow the steps below:

    1-    Edit the Style and enable "Show advanced options (CSS Source)"
    2-    Move on to the Settings screen and expand Results Page
    3-    Select Label, switch to Source tab and find ".cbResultSetLabel". Add the following:

    display: inline-block;
    width: 70px;

    4-    Select Data and find ".cbResultSetData". Add the following:

    display: inline-block;
    width: 100px;

    You can play with the width number to get the best fit for your page.

    NOTE: inline-block style should NOT be applied to Tabular DataPage labels/data fields.

    *** Changes you make in a style will affect all the pages that are using it. It is strongly recommended to make a copy of the style, apply it to your DataPage and make the changes in the copy one.
  2. Like
    MayMusic got a reaction from lmooring in Result Page In A Pop Up Window   
    Create your search and result pages in two different pages as described here http://howto.caspio.com/tech-tips-and-articles/parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/  
    In Configure Fields screen of the search page add Hear/Footer to create your customized button using the code below in the Footer: <input type="button" value="Search" onClick="gotoreport();"> <script language="javascript" type="text/javascript"> function gotoreport() { var URL =  "URL OF THE REPORT PAGE?PARAMNAME=" + document.getElementById('FIELD ID').value + "& PARAMNAME=" + document.getElementById('FIELD ID').value;           newwindow=window.open(URL,'name','height=200,width=150');           if (window.focus) {newwindow.focus()}           return false; } </script> You need to replace URL OF THE REPORT PAGE with URL of the report page and PARAMNAME with the parameter name you are receiving in the report page in Configure Filtering Fields screen as described in the tutorial. Also FIELD ID with the real field ID.
     
    To hide the original submit button you can either add display:none; to .cbSubmitButton in the style you are using for this page or add a Header to the page and use:
    <style> #Submit{ display:none; } </style>
  3. Like
    MayMusic got a reaction from lmooring in Validate Based On Date Entered In Submission Form   
    You can try the following code. Make sure to replace 'DATEFIELDNAME' with the real field name in this line: var mydate = document.getElementById('InsertRecordDATEFIELDNAME').value;
    <script>  var TwoWeeksAgo = new Date(); TwoWeeksAgo.setDate(TwoWeeksAgo.getDate() - 14); function chk_date(){ var mydate = document.getElementById('InsertRecordDATEFIELDNAME').value; if ( Date.parse(mydate) <=  TwoWeeksAgo ) { alert('pick a date within the past 14 days'); return false; } } document.getElementById('caspioform').onsubmit=chk_date; </script>
  4. Like
    MayMusic got a reaction from Master in Go Back   
    In destination after submission screen you have have a java script which is reading the value of a dropdown if it is BACK it will go back two pages if it is not BACK then it will pick the link from value of the dropdown and that will be the destination link
    <script> function goBack() { window.history.go(-2); } if ('[@cbParamVirtual1]' == 'BACK'){ goBack(); } else { window.location.href="[@cbParamVirtual1]"; } </script> In here the dropdown was a virtual field you can select the field name from picker
  5. Like
    MayMusic reacted to Jan in Cascading "text Area" Element?   
    It seems, you can find a solution in this topic.
  6. Like
    MayMusic got a reaction from swipebox in Conditional Text On Report   
    You can add an HTML Block to your report and use this code:
    <script> if ("[@field:FIELDNAME]" == "Not Completed") { document.write("<a href='http://caspio.com'> Click Here</a>"); } </script> Replace the link and also FIELDNAME in the code above
  7. Like
    MayMusic got a reaction from reyemmaus in Submission Forms - Sequential Ids   
    Why not using autonumber field which will be creating sequential number itself? 
  8. Like
    MayMusic got a reaction from kme in Timestamp When "y" Clicked   
    <script> var currentdate = new Date(); var datetime = currentdate.getDate() + "/"                 + (currentdate.getMonth()+1)  + "/"                 + currentdate.getFullYear() + " "                   + currentdate.getHours() + ":"                   + currentdate.getMinutes() + ":"                 + currentdate.getSeconds(); document.getElementById('EditRecordSupportReady0').onclick= function () { if (document.getElementById('EditRecordSupportReady0').value == 'Y'){ document.getElementById('EditRecordSupportRequiredYes').value = datetime; document.getElementById('EditRecordSupportRequiredYes').disabled= true; } else if (document.getElementById('EditRecordSupportReady1').value == 'Y') { document.getElementById('EditRecordSupportRequiredYes').value = "" ; } } document.getElementById('EditRecordSupportReady0').onclick= function () { if (document.getElementById('EditRecordSupportReady0').value == 'Y'){ document.getElementById('EditRecordSupportReadyYes').value = datetime; document.getElementById('EditRecordSupportReadyYes').disabled= true; } else if (document.getElementById('EditRecordSupportReady1').value == 'Y') { document.getElementById('EditRecordSupportReadyYes').value = "" ; } } </script> This code should make the visible text field disabled so user cannot change and also to remove the value from hidden text field since if user selects Yes first the date will appear on text field and now if checks no the field is hidden but the value is there so we need to remove the value now 
     
    I have  not tested the code but it should work
  9. Like
    MayMusic reacted to kme in Timestamp When "y" Clicked   
    MayMusic - Thanks so much, it is working now.
     
    For those interested in the solution, 
    The additional problem was that Timestamp field in the Table had to have a datatype of Text(255).
    In the Details Page, Timestamp was changed to a Text Field. Once Yes was clicked, the textfield was filled with a timestamp, and then when Update was clicked, the field in the Results Page was filled with the timestamp.
     
    Thanks again.
  10. Like
    MayMusic got a reaction from Domco in Reduce Row Hight   
    It is good to know the order for padding which is :
     
    padding: top right bottom left
  11. Like
    MayMusic got a reaction from Domco in Borders Between Rows When I Deploy To Wordpress   
    In the style under Form/Details >> Layout make sure you do not have border for label cells, field cells and etc
  12. Like
    MayMusic got a reaction from Domco in Conditionally Show/hide Html Based On User Access Level   
    This line is missing closing "]"
    var type_manager = '[@authfield:manager]'; and in your code you have added } by mistake
  13. Like
    MayMusic got a reaction from jonathanr in Possible To Show A Search Form And An Initial Dataset On Page Load?   
    The report needs to be a predefined report, so for the existing one you can check it to be a predefined report and then receive all the search parameters in Configure Filtering Fields screen
  14. Like
    MayMusic reacted to MayMusic in Expired Records   
    Instead of the date field add an HTML Block to the Configure Results Page Fields screen and use this code:
    <script> if  (Date.parse('[@field:DateFieldName*]') > Date.parse('[@cbTimeStamp*]')) { document.write("<div style='color:red;'>[@field:DateFieldName]</div>"); } else { document.write("[@field:DateFieldName]"); } </script> Make sure you have enabled parameters and select [@field:DateFieldName] from the picker
  15. Like
    MayMusic got a reaction from Domco in Rich Text Area   
    1. Your table has a text 64k field called "html_text". Your DP includes the field and form element is text area.
    2. Place the following code in the DP header:
     
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/assets/skins/sam/skin.css"> <!-- Utility Dependencies --> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"></script> <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> <script src="http://yui.yahooapis.com/2.5.2/build/container/container_core-min.js"></script> <script src="http://yui.yahooapis.com/2.5.2/build/menu/menu-min.js"></script> <script src="http://yui.yahooapis.com/2.5.2/build/button/button-min.js"></script> <!-- Source file for Rich Text Editor--> <script src="http://yui.yahooapis.com/2.5.2/build/editor/editor-beta-min.js"></script>
    3. Place the following code in the DP footer:
     
    <script> window.onload = function() { var myEditor = new YAHOO.widget.Editor('InsertRecordhtml_text', {    height: '400px',    width: '600px',    dompath: true,    animate: true         }); myEditor.render();                 document.getElementById("caspioform").onsubmit = function() {                     myEditor.saveHTML(); //var myHTML = myEditor.get('element').value;                 }             } </script>
    4. Your webpage should have <body class="yui-skin-sam">

    5. The 'InsertRecordhtml_text' should be updated with your field name reference.


    ----- On Update page and Details Page -----

    Repeat Steps 1 through 4.
    on Step 5 replace 'InsertRecordhtml_text' with 'EditRecordhtml_text' where the html_text is your field name.


    Now if you wish to dispaly data on your DataPage as "Dispaly only" format make sure to Render the value as "HTML". Data is being saved into the table along with HTML tags.
  16. Like
    MayMusic got a reaction from Domco in Field Length   
    This is possible by setting fixed width for results page label and data elements in the style. To do so, follow the steps below:

    1-    Edit the Style and enable "Show advanced options (CSS Source)"
    2-    Move on to the Settings screen and expand Results Page
    3-    Select Label, switch to Source tab and find ".cbResultSetLabel". Add the following:

    display: inline-block;
    width: 70px;

    4-    Select Data and find ".cbResultSetData". Add the following:

    display: inline-block;
    width: 100px;

    You can play with the width number to get the best fit for your page.

    NOTE: inline-block style should NOT be applied to Tabular DataPage labels/data fields.

    *** Changes you make in a style will affect all the pages that are using it. It is strongly recommended to make a copy of the style, apply it to your DataPage and make the changes in the copy one.
  17. Like
    MayMusic got a reaction from Domco in Conditionally Show/hide Html Based On User Access Level   
    Did you try to add a div and give it an ID then hide the div like
     
    document.getElementById('DIV ID').style.display = 'none';
     
    and show other:
    document.getElementById('DIV ID').style.display = 'block';
  18. Like
    MayMusic got a reaction from Ned006 in Field Length   
    This is possible by setting fixed width for results page label and data elements in the style. To do so, follow the steps below:

    1-    Edit the Style and enable "Show advanced options (CSS Source)"
    2-    Move on to the Settings screen and expand Results Page
    3-    Select Label, switch to Source tab and find ".cbResultSetLabel". Add the following:

    display: inline-block;
    width: 70px;

    4-    Select Data and find ".cbResultSetData". Add the following:

    display: inline-block;
    width: 100px;

    You can play with the width number to get the best fit for your page.

    NOTE: inline-block style should NOT be applied to Tabular DataPage labels/data fields.

    *** Changes you make in a style will affect all the pages that are using it. It is strongly recommended to make a copy of the style, apply it to your DataPage and make the changes in the copy one.
  19. Like
    MayMusic got a reaction from Ned006 in Search Results Size   
    Find the answer here http://forums.caspio.com/index.php/topic/4362-search-function/
  20. Like
    MayMusic got a reaction from charris42 in Google Mashup   
    you can create two report page and then choose them both to show on your map one for inspector and one for customer.
  21. Like
    MayMusic got a reaction from Stratz1081 in Convert Text Number To Phone Format.   
    Then you need to create an array. Try this:
    <SCRIPT LANGUAGE="JavaScript"> var o_els = new Array("EditRecordPhone_Work","EditRecordPhone_Cell","EditRecordPhone_Fax") ; function tel() {  // Read the content of the textbox // var message = document.getElementById("EditRecordPhone_Home").value;   //Skip function if textbox is empty, else you will see () - for (var i = 0; i < o_els.length; i++) { if (o_els[i] != "") { var message=document.getElementById(o_els[i]).value;   // Strip off all the spaces document.getElementById(o_els[i]).value = (message.replace(/[^\d]/g, '')); var message1 = document.getElementById(o_els[i]).value; document.getElementById(o_els[i]).value = ("(" + message1.substring(0,3) + ") " + message1.substring(3,6) + "-" + message1.substring(6,10)); } }  } // Call function when value in the textbox changes for (var i = 0; i < o_els.length; i++) { document.getElementById(o_els[i]).onchange=tel; } </SCRIPT>
  22. Like
    MayMusic reacted to nkamalan in Fill text fields with existing info if the checkbox is check   
    Please try this code in an HTML block at the very end of the element list or in the footer:
     
     


    <script>
    function f_address()
    {
        if(document.getElementById('cbParamVirtual1').checked)
        {
      document.getElementById('InsertRecordBilling_Address').value=document.getElementById('InsertRecordShipping_Address').value;
    document.getElementById('InsertRecordBilling_City').value=document.getElementById('InsertRecordShipping_City').value;
    document.getElementById('InsertRecordBilling_State').value=document.getElementById('InsertRecordShipping_State').value;
    document.getElementById('InsertRecordBilling_zip').value=document.getElementById('InsertRecordShipping_zip').value;
    } else {
    document.getElementById('InsertRecordBilling_Address').value="";
    document.getElementById('InsertRecordBilling_City').value="";
    document.getElementById('InsertRecordBilling_State').value="";
    document.getElementById('InsertRecordBilling_zip').value="";
    }


    }
    document.getElementById('cbParamVirtual1').onclick= f_address;
    </script>


     
    Please note in here you need to replace cbParamVirtual1 with the ID of the checkbox and all other field IDs with the appropriate ID you have in your form. 
     
    I have one suggestion since you are using Java Scripts. Use Firefox and install Firebug which is an add-on for Firefox, free and open source. It allows the debugging, editing, and monitoring of any website's CSS, HTML, DOM, and JavaScript, and provides other Web development tools. It also has a JavaScript console for logging errors and watching values, as well as a "Net" feature which monitors the amount of time in milliseconds it takes to execute scripts and load images on the page. I am also using Firebug to get the ID of an element.
     
    Cheers    
  23. Like
    MayMusic got a reaction from ShWolf in Search By Year   
    In the search page for this field try to add criteria to the field and select OR as the operator between values. But you only have Date, Date and Time, Month and Year and Year options you cannot only choose Month !!! Give it a try and let me know though.
     
    To add criteria to the field highlight the field name in Configure Search Field screen and then from the picker where you add HTML Block/Header/Footer you can also select Criteria
  24. Like
    MayMusic got a reaction from Domco in Expired Records   
    Instead of the date field add an HTML Block to the Configure Results Page Fields screen and use this code:
    <script> if  (Date.parse('[@field:DateFieldName*]') > Date.parse('[@cbTimeStamp*]')) { document.write("<div style='color:red;'>[@field:DateFieldName]</div>"); } else { document.write("[@field:DateFieldName]"); } </script> Make sure you have enabled parameters and select [@field:DateFieldName] from the picker
  25. Like
    MayMusic got a reaction from wharton in Update Button On Details Page Won't Go Away   
    There should be something in the page like virtual field or something. You can hide these buttons in the style. Open style and go to setting screen, under forms/details highlight buttons and switch to source tab look for cbBackButton and cbUpdateButton and add display:none;
     
    If you can provide me the link of the page here I will be able to tell you why it is still showing up
×
×
  • Create New...