aam82
Caspio Guru-
Posts
190 -
Joined
-
Last visited
-
Days Won
10
Everything posted by aam82
-
If that is your only issue, then this little edit should do it: Go to Styles-Caspian(or whatever stylesheet that datapage uses) -ResultsPage, Paging -scroll down to Element Type: Paging Controls Cell and click it -click ... next to alignment, and set to middle-left instead However, this is an issue with Divi Builder, or the settings you have specified there. Your datapages are too wide for the divs, and the overflow is visible. You could also try limiting your column widths on the LEFT datapage, so that the total page width is less, to try to make it actually fit the div. You will also run into issues with monitors/resolutions that are different than your own. Right now you are correcting for your particular setup only.
-
I use this script in a footer to find email addresses in a report, put them in a box (semi-colon separated), and copy the contents of the box to a clipboard on button click. It should work if you only have emails in one column, and want all of them. <p id="emailCount"></p> <textarea id="emailOutput" style="width: 500px; height: 200px;"></textarea> <p> <button class="js-textareacopybtn">Copy Emails to clipboard</button> </p> <SCRIPT LANGUAGE="JavaScript"> var elems = document.getElementsByTagName("td"); var copiedEmails = []; var numEmails = 0; for (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerText.includes("@")) { copiedEmails.push(elems[i].innerText); numEmails += 1; console.log (numEmails); } } var joinedEmails = copiedEmails.join("; "); document.getElementById("emailOutput").innerHTML= joinedEmails; document.getElementById("emailCount").innerHTML= "Found " + numEmails + " emails."; </script> <script> var copyTextareaBtn = document.querySelector('.js-textareacopybtn'); copyTextareaBtn.addEventListener('click', function(event) { var copyTextarea = document.getElementById("emailOutput"); copyTextarea.select(); try { var successful = document.execCommand('copy'); var msg = successful ? 'successful' : 'unsuccessful'; console.log('Copying text command was ' + msg); } catch (err) { console.log('Oops, unable to copy'); } }); </script>
-
You can hide columns in tabular reports via css. The cascading should still work. #tabular table:nth-of-type(1) td:nth-of-type(4) {display: none;} #tabular table:nth-of-type(1) th:nth-of-type(4) {display: none;} 4 indicates the column number.
-
table How to Search an Entire Table
aam82 replied to aewilcox10's question in Tables, Views and Relationships
If you code your scholarships datasource with a citizenship field scholarships name, type, citizenship and your Users table with a citizenship field users name, email, citizenship Then you can make a Scholarships Report, with Record Level Security, based on: Identitiy field in Authentication: Users_Citizenship Matching field in current data source: Scholarships_Citizenship -
Adding newline into text fields
aam82 replied to prashanth's question in Tables, Views and Relationships
The header field takes html line breaks. Add in source mode: <br /> In WYSIWYG mode, carriage returns should be honored, no need for \n. -
Integration Of Caspio Calendar With Google And Microsoft Outlook
aam82 replied to skauntey's question in API and Integration
Insert an HTML block field, and in the source editor, do something like this: <a id="addToGoogle" href="https://www.google.com/calendar/render?action=TEMPLATE&text=[@field:YourFieldHere]&dates=[@field:YourFieldHere]&details=[@field:YourFieldHere]&location=[@field:YourFieldHere]&sprop=[@field:YourFieldHere];sprop=[@field:YourFieldHere]:" class="button">Add to Google Calendar</a> I don't know what those sprop parameters at the end are doing. so for example where it says text=[@field=YourFieldHere], you would select the field with the name of your event as the field for that parameter: text=[@field=EventName] -
I Need to Create a "Tally Sheet"
aam82 replied to acslakeland's question in Tables, Views and Relationships
It sounds like you would like to have a button to increment or decrement the value of an item that you buy and sell. You can do this with Caspio using javascript, but it will involve more steps than the example that you linked, because you first must open an item for editing, then increment/decrement, then close the item to save your edit. More broadly though, you might want to instead build an Invoicing workflow and an Inventory workflow. The difference is that if you merely change the quantity of your item, you will have no history or paper trail of transactions--just the present value of the item qty. -
Replacing blanks in a field
aam82 replied to sgriesbach's question in Tables, Views and Relationships
Bumping this. I can't find any documentation regarding search/replace syntax in Table view. -
Dynamically change the background of a row
aam82 replied to Michitect's question in Tables, Views and Relationships
Here is a previous thread on the subject. -
Make Virtual Fields Input into Tables
aam82 replied to kammerer09's topic in User JavaScript and CSS Discussions
you could try using Inline Edit with AJAX enabled to submit multiple records, though one at a time, without a page reload. -
Use Virtual check box for condition to send emails
aam82 replied to DesiLogi's topic in User JavaScript and CSS Discussions
When I had a similar need, I ended up using two datapages: one for the report and its functions, another for emails. In your case, the details page would link to a second datapage, that always sends emails on updates. This might work if you can separate the actions that should never trigger an email (let them do it on first page), and actions that should always trigger email (use link to 2nd datapage that always emails).- 6 replies
-
- conditional
-
(and 1 more)
Tagged with:
-
Integration Of Caspio Calendar With Google And Microsoft Outlook
aam82 replied to skauntey's question in API and Integration
Sorry, I was mistaken. This is very doable. I've successfully adapted the code on this page: click on any event here: https://london.techhub.com/events/ source code: <a id="addToGoogle" href="https://www.google.com/calendar/render?action=TEMPLATE&text=VC%20Coffee%20Morning%20with%20BGF%20Ventures&dates=20160915T090000Z/20160915T110000Z&details=https://london.techhub.com/events/vc-coffee-morning-with-bgf-partners-1&location=TechHub%20@%20Campus%20London&sprop=&sprop=name:" class="btn btn-primary btn-xs"><i class="fa fa-google-plus" yv6gjb9="" hidden=""></i> Google</a> <a id="addToOutlook" href="data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0AURL:https://london.techhub.com/events/vc-coffee-morning-with-bgf-partners-1%0ADTSTART:20160915T090000Z%0ADTEND:20160915T110000Z%0ASUMMARY:VC%20Coffee%20Morning%20with%20BGF%20Ventures%0ADESCRIPTION:https://london.techhub.com/events/vc-coffee-morning-with-bgf-partners-1%0ALOCATION:TechHub%20@%20Campus%20London%0AEND:VEVENT%0AEND:VCALENDAR" class="btn btn-primary btn-xs"><i class="fa fa-windows"></i> Outlook</a> You can put Caspio parameters in there. -
I found a neat script link: http://jsfiddle.net/7DT5z/9/ You would replace #word_count with the ID of your field.
-
The className selectors are nice and clean in URL and Preview deployment. But when you use JS embed deployment on Report Datapages, unique IDs are appended to every class name on every page load. This has something to do with each record being a separate AJAX request, and inserting the response into the unique element. So I think if you inspect the page, you'll see that cbResultSetCalendarCaption becomes cbResultSetCalendarCaption_923746289379. So a different selector method is needed. In tabular datapage reports, the strategy everywhere on this forum is to use DOM node traversal by first creating a unique DIV for each record by inserting an HTML block field, with a <div id="@field:uniqueID"></div>. Now you have a starting point (document.getElementById("@field:uniqueID")), to traverse up (parentNode), down (childNode) etc. from. An alternative that can work in some cases is document.querySelectorAll, because it accepts wildcards, like contains,begins with, e.g. "CalendarCaption". link: http://stackoverflow.com/questions/8714090/queryselector-wildcard-element-match
-
link: http://stackoverflow.com/questions/15712880/load-iframe-links-into-parent-window
-
Reference display value of related field with Javascript
aam82 replied to ray's topic in User JavaScript and CSS Discussions
link: http://stackoverflow.com/questions/5913/getting-the-text-from-a-drop-down-box instead of setting your variable to a value, try to set it to the text of the selected <option> property for that field. -
you have to hover over links on this forum in order to see them due to a new bug. What is your date format? Can you paste an example? The idea is to split up the datetime string on a " ", then grab the piece you want from the resulting array, then combine it with another field. Caspio-how to concatenate: JS split function reference link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split
-
HTLM format for datafield in datapage footer
aam82 replied to DesiLogi's topic in User JavaScript and CSS Discussions
I don't know the details, but it's a security measure. Maybe you could google form input, sanitization, security, and character escaping together to see the general idea. It would make sense that they do more of this for auth fields, and not other fields. Just a guess. This doesn't have to do with your hostpage. On the bright side, the workaround seems pretty clean a straightforward to me. -
sorry, I opened this thread before MayMusic replied, but read it later, so I didn't see her post.
- 7 replies
-
- javascript
- multiselect
-
(and 2 more)
Tagged with:
-
New field via web update records option ?
aam82 replied to roattw's question in Tables, Views and Relationships
Yes, lookup Views in the Caspio documentation. A View can combine Tables by joining them on matching ID fields. -
Customizing Collapsible Sections Button Look & Text
aam82 replied to LyaP's topic in User JavaScript and CSS Discussions
Try to add a class to the button, and put a CSS rule for the class in your Caspio or Site stylesheet. Add a class from linked How To, see bold: <input type="button" onClick="Displayer(1)" value="Personal Info"> with <img src="IMAGE URL " class="caspioPointer" onClick="Displayer(1)" > CSS .caspioPointer { cursor: pointer; } or for inline CSS, in your datapage footer, put <style> .caspioPointer { cursor: pointer; } </style> more options here http://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor -
Combine 2 fields into 3rd on Inline Insert
aam82 replied to DesiLogi's topic in User JavaScript and CSS Discussions
Where on your datapage are you calling your custom.js? Your script requires jQuery as well... Can you use inline javascript instead of an external file? The Caspio article on this is good: -
I think this is what's known as global namespace pollution. The quick fix here is to add a number next to every variable in each script, so that all variables are unique to each of your three scripts. e.g. v_state becomes v_state1 in script 1 v_state2 in script 2 etc. Edit: I don't think you have to do this for the functions, because the function limits the namespace.
- 7 replies
-
- javascript
- multiselect
-
(and 2 more)
Tagged with:
-
HTLM format for datafield in datapage footer
aam82 replied to DesiLogi's topic in User JavaScript and CSS Discussions
I took a look, and apparently the authfield output is being escaped by a preprocessor on the server before being sent...I guess security measures? You can use the following script to capture the output of the field from a hidden DIV, and use the text there as the HTML content of a second DIV that you display. <div id="escaped_html" style="display: none">[@authfield:company_footer_html]</div> <div id="unescaped_html"></div> <script> var userFooter = document.getElementById("escaped_html").innerText; document.getElementById("unescaped_html").innerHTML = userFooter; </script> -
HTLM format for datafield in datapage footer
aam82 replied to DesiLogi's topic in User JavaScript and CSS Discussions
Did you try using an app parameter instead of an auth parameter? link: http://howto.caspio.com/apps/app-parameters/