Jump to content

Search the Community

Showing results for tags 'inline insert'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 5 results

  1. I want to be able to limit inline edits/inserts on a datapage. I'm trying to limit a date to dates that are after 1 week ago. Is there a way I can do this?
  2. I am trying to add Javascript to validate/limit the acceptable date range for a tabular inline add. I have tried several suggestions from various forum posts, but cannot get it to work. I started with this code as a form of this does work in a different application (https://forums.caspio.com/topic/16261-validate-field-value-before-submit-in-tabular-search-report-both-table-and-details/). Please help. <script> var nameOfField = "InlineAddDate"; document.addEventListener('DOMSubtreeModified', function(){ if(document.getElementsByName(nameOfField)[0]) { document.getElementsByName(nameOfField)[0].addEventListener('change', function(){ var cash = document.getElementsByName(nameOfField)[0].value; var sDate = new Date(cash); var prevMonday = new Date(); prevMonday.setDate(prevMonday.getDate() - (prevMonday.getDay() + 6) % 7); var nextSunday = new Date(); nextSunday.setDate(nextSunday.getDate() + (0+(7-nextSunday.getDay())) % 7); if (sDate < prevMonday || sDate>nextSunday){ alert("Enter a valid date between the previous Monday and the next Sunday."); document.getElementsByName(nameOfField)[0].value=""; document.getElementsByName(nameOfField)[0].focus(); }); } }); </script>
  3. I'm trying to figure out how to use a concatenate function that works in a submission form for a tabular inline insert. I believe Ajax has to be disabled for this (I did that). I have the below in a custom.js file accessible by the page the datapage is hosted in: //concate for the simple combination field function f_secondcombination(part1, part2, comb){ $("[name='"+comb+"']").val($("[name='"+part1+"']").val()+"_"+$("[name='"+part2+"']").val()); } In the datapage itself I'm using, in the header: <div id="cb_sup"> In the footer of the datapage: </div> <script> $("#cb_sup form”).click(function(){ f_secondcombination('InsertEditRecordCompanyID', 'InsertEditRecordArea', 'InsertEditRecordCompanyID_Area'); }); $(document).ready(function(){ var v_errmes = "This Area already exists for this Company. Please provide a different one."; f_modify_err_message("cb_value_present", "cb_not_valid_info",v_errmes); }); </script> When the user adds a new record (in inline insert) it should combine the 'CompanyID' field with the 'Area' field and put that in 'CompanyID_Area' (which will be a unique field in the table so duplicates can be checked). I can't get this to work- if someone can please help troubleshoot this I'd very much appreciate it.
  4. I am trying to create a pop-up child form in the form of a Tabular Report datapage, as I want the user to be able to edit information relating to existing contacts or add a new contact for the organization; the organization is unique and represented by Org_ID on the original Submission Form. For additional records, I hope to set the inline insert value for the organization to its Org_ID, which is the parameter I want to filter the report on. If at all possible I would like to hide this Org_ID, and show the organization name either in the tabular report or ever better in the report Header. The link to open a pop-up would be next to the select a contact dropdown on the Submission form.
  5. I'm trying to figure out how to use a concatenate function that works in a submission form for a tabular inline insert. I believe Ajax has to be disabled for this (I did that). I have the below in a custom.js file accessible by the page the datapage is hosted in: //concate for the simple combination field function f_secondcombination(part1, part2, comb){ $("[name='"+comb+"']").val($("[name='"+part1+"']").val()+"_"+$("[name='"+part2+"']").val()); } In the datapage itself I'm using, in the header: <div id="cb_sup"> In the footer of the datapage: </div> <script> $("#cb_sup form”).click(function(){ f_secondcombination('InsertEditRecordCompanyID', 'InsertEditRecordArea', 'InsertEditRecordCompanyID_Area'); }); $(document).ready(function(){ var v_errmes = "This Area already exists for this Company. Please provide a different one."; f_modify_err_message("cb_value_present", "cb_not_valid_info",v_errmes); }); </script> The other solution I'm trying is having only this (so it's not referencing the custom.js file) in the footer: <SCRIPT LANGUAGE="JavaScript"> function concatenate() { var CompanyID = document.getElementById("InsertEditRecordCompanyID").value; var Area = document.getElementById("InsertEditRecordArea").value; var CompanyID_Area = CompanyID + Area; document.getElementById("InsertEditRecordCompanyID_Area").value = CompanyID_Area; } document.getElementById("caspioform").onsubmit=concatenate; </SCRIPT> Neither of these is working: When the user adds a new record (in inline insert) it should combine the 'CompanyID' field with the 'Area' field and put that in 'CompanyID_Area' (which will be a unique field in the table so duplicates can be checked). If someone can please help troubleshoot this I'd very much appreciate it.
×
×
  • Create New...