-
Posts
155 -
Joined
-
Last visited
-
Days Won
9
ChrisCarlson last won the day on May 16
ChrisCarlson had the most liked content!
Recent Profile Visitors
1,735 profile views
ChrisCarlson's Achievements
-
chumkirebzi reacted to an answer to a question: Use a parameter in a forumala field to created unique URL for profile page
-
Volomeister, I wanted to try using a 3rd party editor with an available full Spellcheck function since the full CKE Editor spellcheck function is disabled. CKE Editor is the name of the 3rd party integration that Caspio uses for Rich Text Editor. Since I was not able to get TinyMCE to work, I decided to use the default editor with its limited Spellcheck functionality. I described above where you can use the CTRL button to get to misspelled words. This is a limited spellcheck functionality. CKE Editor has a full spellcheck function available, but it looks like Caspio did not include it in their CKE Editor configuration. If they had we would see a Spellcheck button in the Rich Text Editor controls, which would launch a Spellcheck dialog window. I am not sure if CKE Editor full spellcheck transmits data to 3rd party servers, but if it does I can see why Caspio did not opt for that configuration. I don't have a datapage setup with TineMCE since I did not pursue using that solution.
-
I am using this one-line of code to set font size in Rich Text Editor text areas - I found it in CKEditor documentation: <script> CKEDITOR.addCss(".cke_editable { font-size: 18px!Important; }"); </script> It works great on datapage submission forms, but when using it in a tabular report > details update page I run into this issue: - On the first time the tabular report is loaded and details update form is loaded, it does not work. - It then works on subsequent times when loading the details update page. What is causing it to fail on the initial load? I tried wrapping it in a time delay script but that did not work. I suspect it has to do with AJAX loading. Does anyone have any ideas how I could fix it? I tried the solutions above but could not get those to work for a tabular report > details update page (with responsive disabled).
-
How to get the file size
ChrisCarlson replied to CoopperBackpack's topic in User JavaScript and CSS Discussions
Volomeister, Thanks, this works great. I tested in both inline add and inline edit and it works good. I initially put it in an HTML block on the record row. It worked there except for when table is empty and when adding the first row. I moved it to the footer and it resolved that. -
How to get the file size
ChrisCarlson replied to CoopperBackpack's topic in User JavaScript and CSS Discussions
Hello, How can I modify this code to work for Inline Edit? I have the same code in an HTML block for Inline Add based on instructions above and that worked. <script type="text/javascript"> document.addEventListener('DataPageReady', fileInputEvent) function fileInputEvent() { document.querySelector("#InsertRecordFile_f"),addEventListener('change', fileInputHandler); // use the InsertRecord[your file field name] instead document.removeEventListener('DataPageReady', fileInputEvent) } function fileInputHandler(event) { const fileSizeInput = document.querySelector('#InsertRecordFile_size'); // use the InsertRecord[your file size field name] instead fileSizeInput.value = event.target.files[0].size; } </script> -
Chad, You can get to the native browser spellcheck in Rich Text Editor by holding down the CTRL button and then selecting the red underlined (misspelled) text. For example in Google Chrome, it should give the normal menu that displays when right-clicking in the browser. I have only tested this in Google Chrome. I tried TinyMCE and got the menu to display, but when submitting my form the value in the text area field does not record. selector:'textarea#InsertRecordEmailBody', My field name is "note_content" - I am listing it as: selector:'textarea#InsertRecordnote_content', Any ideas what I am doing wrong?
-
Microsoft Access to Caspio conversion tutorial?
ChrisCarlson replied to RJArcher's question in Tables, Views and Relationships
RJArcher, There is not a particular forum for MSAccess Database conversion. I have converted several Microsoft Access databases before. Caspio has been a great tool to convert legacy access databases into online web applications. It is much more stable than MSAccess. Some examples include you can authenticate access better, you don't have to worry about issues like the file getting corrupted, and you can avoid record locking issues. Caspio previously had a data import option that would allow you to import MSAccess files under MSAccess file type directly into Caspio, but it was only for table import data. Since that feature has been deprecated, you import data via other formats (csv, text tab delimited, excel, etc). For MSAccess databases, you will need to manually re-create the Access Database in Caspio. Once you are familiar with all of the features in Caspio, you can emulate the MSAccess database structure with comparable features in Caspio. Here is a list of MSAccess functions and their equivalent function(s) in Caspio: Tables in MSAccess = Tables in Caspio Queries in MSAccess = Views in Caspio Forms in MSAccess = Datapages in Caspio Reports in MSAccess = Datapages in Caspio VB Scripts in MSAccess = Caspio table formulas, datapage calculations, triggered actions in tables * and tasks *, and UI scripting such as Javascript/Jquery ** * as long as you have selected a Caspio account that includes those features or have added on those resources to your account. ** Javascript/Jquery may be needed depending on complexity of your existing MSAccess Database, but in some cases you can achieve equivalent functionality using Caspio's built in features like triggered actions and tasks. Caspio's introduction of triggered action and tasks in recent years has reduced the need to resolve via scripting. You can find online documentation here converting MSAccess databases: https://www.caspio.com/use-cases/migrate-microsoft-access-online/ -
Use a parameter in a forumala field to created unique URL for profile page
ChrisCarlson replied to Corpcatalog's question in Parameters
Corpcatalog, I am assuming that the GrowerNumber field is numeric. If so, you cannot intermix a text value and numeric value without first casting the numeric value as varchar. Casting as varchar converts the numeric value to text so that you do not receive invalid formula message. This revised formula should work: 'https://www.certlink.org/grower-profile.html?GrowerNumber=' + Cast([@field:InsertRecordGrowerNumber] as varchar) If your field is not numeric, you do not need to cast as varchar. Also make sure to place ' + at the correct position right after the equals sign. 'https://www.certlink.org/grower-profile.html?GrowerNumber=' + [@field:InsertRecordGrowerNumber] You can find a list of functions for use in formulas here: https://howto.caspio.com/function-reference/ -
MaraMara reacted to a post in a topic: Creating Available Stock traffic lights - Color Formatting text AND text background Based on Cell Value in a table
-
You can achieve this by doing the following: Remove your STOCK field and add an HTML block that will act as the Stock column. Label the HTML Block as "STOCK". Disable HTML editor in the HTML block advanced options tab. Copy and paste the code below into the HTML block: Replace the 7 instances of FIELDNAME below with the name of your STOCK Field. You can adjust the color, background color, and padding in each statement below as needed. <div id="mydiv[@field:ID]"> </div> <SCRIPT LANGUAGE="JavaScript"> if ("[@field:FIELDNAME]" == "A") { document.getElementById("mydiv[@field:ID]").innerHTML ="<span style='color:white;background-color:red;padding:6px;'> [@field:FIELDNAME]</span>"; else if ("[@field:FIELDNAME]" == "B") { document.getElementById("mydiv[@field:ID]").innerHTML ="<span style='color:black;background-color:yellow;padding:6px;'> [@field:FIELDNAME]</span>"; else if ("[@field:FIELDNAME]" == "C") { document.getElementById("mydiv[@field:ID]").innerHTML ="<span style='color:white;background-color:green;padding:6px;'> [@field:FIELDNAME]</span>"; } else{ document.getElementById("mydiv[@field:ID]").innerHTML ="[@field:FIELDNAME]"; } </SCRIPT> See this article for more info:
-
ChrisCarlson started following Volomeister
-
Volomeister, Thanks for the updated script. Your suggestion worked well for the more than 1 field approach. A couple issues I am running into: 1. When submitting the submission form and receiving a page error (for example, some other required field not filled out), if the user selects any option other than "Prefer not to answer" (the targetOptionName value) before submission, when the page displays after submission in the error state, it allows for any options to be selected and the script uncheck/greyout controls stops working. This only seems to be an issue on the submission datapage script, as the details page script works correctly on page errors. And this only is an issue if they select a non-targetOptionName value (if they selected the targetOptionName value before submit, the script still functions correctly when page error occurs). 2. Is it possible to make the checkbox greyout reverse in logic. For example, I have 5 multiselect options. One of them is "Prefer not to answer" which is the targetOptionName and handles great with this script, but I have another field with "Prefer to self-describe" which displays another text field for "Self-Described Race" using Caspio's built-in conditional logic where it hides/displays via a form section. The built in conditional logic does not trigger the form section hide when this script unchecks and greys out the affected option. The built in conditional logic seems to require end user click to trigger. Even though the addition of the 2nd function below would cause the user to have to manually uncheck values to be able to check the targetOptionName checkbox, it would solve the issue with the conditional logic failing to trigger by forcing the end user to click/unclick the checkbox that has conditional logic and trigger it. Are you able to edit the script to include #2 below? When targetOptionName is checked, uncheck and grey out all other checkboxes (this is working great with this script) When any other checkbox other than targetOptionName is checked, grey out targetOptionName checkbox. User has to uncheck the checkboxes to get targetOptionName to un-greyout. Thanks again for all your help!
-
Volomeister, Thanks some much for posting the script! It works great except does not seem to work if I want to set it up on more than one field on the same datapage, when repeating the same script for each additional field. For example, I have a field called race with the option (as described above) and an additional field for gender with the same option. I pasted the script twice into my footer of submission datapage. It works good for the first instance of field on the datapage, but the second field (and I am presuming any additional fields) does not respond. This was tested in a submission form.
-
Hello, I was wondering if anyone knows how to achieve the following or has a script written that handles list box options validation. First, I don't want to modify the data type to text as a workaround. I understand that the list box data type has several limitations but need to keep it as a list box data type for the project I am working on. I see in the article below that you can set a limit for the maximum checkbox options on a list box field. https://howto.caspio.com/tech-tips-and-articles/setting-the-maximum-number-of-listbox-selections-in-forms/ Does anyone know how to modify this script or write one that achieves the following: I want to uncheck all other checked list box items when a certain list box option is checked. In other words, when a certain value is checked I want the list box to operate as a single selection and not as a multi-selection. For example I have the following field: Race: African American or Black American Indian or Alaskan Native Asian Native Hawaiian or Pacific Islander White Prefer to self-describe Prefer not to answer When user checks the last option "Prefer not to answer" I want to uncheck all other options (if already checked) and grey them out, similar to how the max number script above functions. I am looking for a solution that works on both Submission form and Detail update datapages. Per requirements, the user can select more than one race but when selecting Prefer not to answer that should be the only value selected. I want to enforce that rule through a script (instead of relying on user accuracy).
-
EdwardG reacted to a post in a topic: Hide the Edit button within Tabular Result page
-
I am using two fields in a tabular report details page: a dropdown field and a Multi-select listbox with Select All option enabled. I would like to automatically unselect all multi-select listbox items that are currently checked when a value is selected in the dropdown field. Any recommendations on how I can achieve this?
-
Chato, You could achieve it through tasks: - create a table that acts as the staging area for transforming the records - create a table that receives the transformed records - create a task that checks the position of the ; in column c and substrings the first part into the final table as a new record and substrings the second part into the final table This process would require a case statement in tasks where it checks position of ; and transforms the value accordingly. You would need multiple if statements to check position of ; and transform accordingly. If import is daily, you could add where clause to select statement that only runs task on today's records (use difference of days between import timestamp and system timestamp = 0). You would need import timestamp added to your table for this. I am using a similar process for a few apps of mine and found it works. If you want to go that route I can share some example task screens for how it would need to be setup. If you are running any aggregate values in your apps off of this field you will want it transformed into numeric, single value only.
-
Reject specific word entered into a field in a submission form
ChrisCarlson replied to DaveC2019's question in General Questions
You could use triggered actions to look for a string that replaces fields contents bases on contains. This method would update the value in the table which you could display on the confirmation page. KEYWORD_1 = @tippytv value KEYWORD_2 = Replaced error message value If you need the value to be displayed to user on the datapage, you could create a rule that runs when field contains the keyword, by hiding a section with HTML block message when field does not contain keyword.