Jump to content

roattw

Caspio Guru
  • Posts

    203
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by roattw

  1. Yes for the libraries. Called them in from the Header. https://c3ebv137.caspio.com/dp.asp?AppKey=3f2d400026716a8f79ee4d37942f
  2. Wow. Both work well. Thank you! The script version was very educational - I can see why it works and where mine was off. The rule for hding the section is very elegant. And proof that I tend to over think things. I think this topic and solution will help other. Thanks again.
  3. Thanks douvega. The link is https://c3ebv137.caspio.com/dp.asp?AppKey=3f2d400023038023adc84db3bd83
  4. Thanks for the reply! Probably not the best example as I dont need a button href link to cause anything. I just need an HTML importan tnote field to appear (HTML block) is a value is selected. The suggested code had an effect, it didnt show the red important note field at all so close. Currently it looks like this. *24-hour clock shows all the time (HTML block), need selective appearance. If SPECIFIC selected here a field for "Specific LSN time" appears. That's where we need the reminder to use 24 hour clock. Doesn't need to be there until then.: The code had effect when placed in the HTML field, it prevented the block from appearing at all regardless of "Specific selection". Still no Red Note HTML text. Not sure if that HREF button or other call is needed to make run the change. This one needs to just be on select. In your example does the <P> ID uniqueParagraph need to to match of be noted somewhere else?
  5. Have a basic form field, drop down, 3 options to select one of: Form field "CME_Category": choices stroke, cardiology, trauma I just want to count number of occurrences of each of those three selection options (stroke, cardiology, trauma) and have them appear in the datapage report. A basic COUNTIF function in Excel. Im using this code I saw in action for a Yes/No field example, but cant get it to work within this situation. Is it not happy with JQuery? This is in FOOTER. Although I have split it in Header, Footer, HTML block etc and still doesnt work. Im just guessing now ;^) The DIV of course appears but it doesnt count. <script type="text/javascript"> $('[@field:CME_Category]').change(function() { // get all selects var allSelects = $(CME_Category'); // set values count by type var Stroke = 0; var Trauma = 0; var Cardiology = 0; // for each select increase count $.each(allSelects, function(i, s) { // increase count if($(s).val() == 'Stroke') { Stroke++; } if($(s).val() == 'Trauma') { Trauma++; } if($(s).val() == 'Cardiology') { Cardiology++; } }); // update count values summary $('.cnt-Stroke').text(Stroke); $('.cnt-Trauma').text(Trauma); $('.cnt-Cardiology').text(Cardiology); }); </script> <div id="CME_Category"> summary<br> stroke = <span class="cnt-stroke">0</span> <br> trauma = <span class="cnt-trauma">0</span> <br> cardiology = <span class="cnt-cardiology">0</span> <br> </div> Need these to show 2 and 1 for Cardiology and Stroke respectively.
  6. How would this work for counting non binary Yes/No field like a drop down, with 4 options? Thanks!
  7. Old post, but can you clarify? When I create a list report of the values I dont see an option to hide. If I have a basic form with basic dropdown and I just want to tally number of times each option was chosen, would this work? Example dropdown field: Favorite Alcoholic Beverage: Wine, Beer, Mixed drinks Over time just want to know how many chose Wine, how many chose Beer, etc. Would it code like this: HEADER: <script type="text/javascript">var countWine=0;var countBeer=0;var countMixed=0;</script> FOOTER: <script type="text/javascript"> document.write(count); </script>
  8. Thanks Douvage With my fledgling JS skills I have a question. The example with showing/hiding images makes sense, but what is the function to show nothing? Im my case if a field (LSN_time) contains the a specific radial button choice (Specific), then show HTML Block 2. Other wise hide it. This isnt working, presumably because of incorrect naming of the HTML Block. <div id="LSNTime"></div> <script> var linkDiv = document.getElementById("LSNTime"); var = 'HTML Block 2'; if('[@LSN_time]' == 'Specific'){ linkDiv.innerHTML = HTML Block 2; } else { linkDiv.innerHTML = none; } </script>
  9. Reporting: simply counting the number of times the choices in a drop down were selected? I have several drop downs on a form. I just need to tally the number of times each of the drop down choices was selected. Cant seem to just get a simple count of each dropdown choice. In excel its a simple countif= fucntion. Kinda surprised a robust system like caspio cant do it out of box. Example: Form data page question asks people Whats Your Type of Music? Drop down options Rock, Jazz, Hip Hop, Classical. After 6 months I need to tally the number of people that chose Rock, Jazz, Hip Hop or Classical. It would be a very basic Excel countif= function.
  10. I want to include an HTML reminder text on a form when a specific field on a form is a certain value. Hint/Tip not what I want since its hidden unless licked. I want some RED text to appear is form field = X. I can get the text to display on form with HTML block. But using Rule Conditions I cant choose to hide the HTML block, only actual fields. Way to apply rule/condition to an HTML block?
  11. YES! I knew there was some simple method I used i the past, just couldnt recall it. Thanks Vitalik.
  12. Hiding Multiple Login Forms: http://howto.caspio.com/tech-tips-and-articles/common-customizations/hiding-multiple-login-forms/?_ga=2.107921729.2102379586.1507150279-2116692682.1507150279 Guide says to this in the HEADER of the Authentication: <div name="cb-auth-box"> And this in the Footer: </div> The problem is that in SOURCE view to enter <div name="cb-auth-box"> the second you switch out of SOURCE view or SAVE it adds the closing </div>. So when you got bak it shows <div name="cb-auth-box"></div> For the Footer </div> it simply removes it altogether, presumably adding it to the footer to close that <div> tag.
  13. Or maybe I could alter the approach/question. If you had only one group of users that self register, then login to enter weekly form data that appends to thier account as a new row of form data, and users could only see their data, how best to set it up?
  14. I have a basic app with only one group of authenticated users (no roles) achieved thru registration. User registers, logs in, then can enter some data using a basic form. OVer time they will add more records via the form and only see their records.Only two tables: Registered users and a Form Data. One authentication. No authentication table.Im trying to combine two datapages emdeded on one webpage - one form and one report so that on one page the user could see the summary report of their current data and also submit another entry. See below:Works well, but because they are both set for record level access when I choose LOGOUT both sections show a login box. Would like logoff to go to one page to log back in. tried to create a static Login Page with redirect but it wouldnt work. I tried a View but couldn't get it to work. Followed many of the how to's but since this one is simple (no roles) none of the examples quite apply. All input welcome.
  15. Hoping you can point me in right direction. Im struggling on something simple. Need users to register. Once registered they make an ENTRY to their profile/account: CMEType: multiple choice | CMEHours: number | Upload: upload file | SUBMIT They can enter as many submissions as they wish which will build in a table. Im having trouble getting a logged in user to see only their entries once logged in and for the main table to distinguish between users. Table1: RecordID: autonumber/unique Name Email: username Password: Password \Registration works fine but having trouble tying a new submission to thier account.
  16. Hopefully I can explain this. Three Fields: A= Yes/No B= Dropdown choice with an "other" option C = Other field if OTHER chosen in dropdown B. If A = No, hide B and C Having trouble getting B and C to appear/hide based on values because I think you can only use a rule on one field at a time. Example: A = Male? (Y/N) , if Yes show B, keep C hidden still. B = Dropdown with "other" option. If other chosen, then show C, the other text field. But the rule stating to hide B and C does not allow me to apply another Rule for C. I can get B and C hidden or shown at same time only. Hope that makes sense. Way around this?
  17. roattw

    Reports Dashboard

    I might be over thinking this, as usual. I would like to create a dashboard page where the user can click a button and run a static commonly requested report, This page would contain 10 or so of the most commonly requested on reports. People would just visit the page, click a report icon, be shown the results, and be done - without having to search, sort, or use other results page functions. Is this a built in option, or is really just a graphic button hyperlinked to a webpage that contains the embedded Caspio report datapage code? Is there a better cooler way? ;^)
  18. Thats beautifully simple! I need it to the minute so one big table, but nice elegant solution.
  19. Mylene. This is working with one exception. Works great but wont work on two other text fields setup the same way. The only thing different is that the two fields where it doesn't work are fields that Show/Hide based on a Rule. Wondering if that Rule status is preventing the field name to be recognized by the script?<script>function isNumberKey(evt){var charCode = (evt.which) ? evt.which : event.keyCodeif (charCode > 31 && (charCode < 48 || charCode > 57))return false;return true;}document.getElementById('InsertDTN_time').onkeypress =isNumberKey;</script>
  20. I have a script to limit field characters to numbers only. Works great on computer/html but not on Smartphones. <script> function isNumberKey(evt){ var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } document.getElementById('InsertRecordTIME2').onkeypress =isNumberKey; </script> Do smart phones use an entirely different set of event handlers or script? Is it the .onkeypress or something more intense?
  21. I have a script forcing numeric characters only in a couple fields (thanks May Music). <script> function isNumberKey(evt){ var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } document.getElementById('InsertRecordFIELD1').onkeypress =isNumberKey; </script> I had several fields like this so I cheated and created one script for each FIELDNAME (I know, I know, Im still learning :^). How could I combine all fields into that one script above? I tried this but it didnt work: document.getElementById('InsertRecordFIELD1','InsertRecordFIELD2','InsertRecordFIELD3')
  22. Thanks Mylene. I was able to get this to work. But I think the onkeypress handler only works on web. Does not restrict letters on smartphones,. Any idea how to apply to mobile?
  23. Thanks for the reply Mathilda My issue is I don't need a time stamp or current time. I need to have the user pick a time of day that something occurred, could have been earlier than when they are actuallyt on the form and what the timestamp would record. Like the calendar date picker but time instead.
×
×
  • Create New...