Jump to content

Search the Community

Showing results for tags 'listbox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • 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 17 results

  1. Hello, I am trying to make a fairly simple database app. It actually started as a simple Google sheet. There is just one trick to it - there is one field for which I need to allow multiple values, but I want each of those values to be validated from a pre-approved list of values. It seems this is not possible in a Google sheet, so I figured I would try Caspio to do it. I'm happy to have the list of values be it's own table and even to have the selection of those values be on a separate form from the creation/editing of the primary record. But I can't really figure out how to do this. Does anyone know of a tutorial that explains this? Thanks
  2. Hello, I was hoping at some point soon Caspio would enable Lookup tables/views in ListBox type fields so the user could create their own choices for the Listbox (instead of it being hard-typed in in the table Design for that Listbox field). It's been awhile though and I can't wait any longer- so I'm using the older method of js and a text field to store multiple values comma delimited. This works fine except I don't have a way to show the related text values to the stored numerical values in a Tabular or Gallery datapage. This is because the field (text255) only has the option for Text, html, email, url link in a Tabular/Gallery datapage. Multiple values can be shown for a text field on a Details page using js and a ListBox type display. Is there any way to utilize something similar for a Tabular/Gallery datapage? I even tried using a trigger to push those multiple values from the text255 field into a Listbox field (because you can display a Listbox type field in a Gallery datapage) but the trigger won't allow updating into Listbox fields. This is frustrating- having dynamic lookups for Listbox fields would solve this issue entirely.
  3. Hi, the below code is used to create comma-delimited text values (in a text255 field) so the user can select multiple values in a list box and save them (separated by commas) in a text field. It's necessary to use this method instead of the Caspio-native 'List' data type because the lookup values need to be dynamic (I wish Caspio would enable this, been waiting FOREVER). This method works great for Details and Update datapages but I need it to also work in a Bulk Edit page. I've tried changing 'EditRecord' to 'BulkEditRecord' but it doesn't work. Does anyone know how to modify this code to work in a Bulk Edit page? This is so the user can select multiple records and update them with multiple selections in a listbox. <script type="text/javascript"> var v_state = "[@field:state]" ; var o_state = document.getElementById("EditRecordstate") ; o_state.multiple = true ; function f_listbox() { if ( v_state.indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state) { o_state.remove(i); break ; } } var o_st = v_state.split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } document.addEventListener('DataPageReady', f_listbox); //You can also use the line below instead of the eventlistener // setTimeout(f_listbox, 20); </script>
  4. I've got 3 fields set as Listboxes on a Submit datapage. I'm using js to select multiple records and enter them comma delimited upon submission. The code works fine when doing it with one Listbox but I can't figure out how to get it to work for all three. Right now I'm just repeating the code for each listbox (with a different variable name for each) but it doesn't work. I imagine there's a more unified way to do this so the code covers all 3 Listboxes. Anyone have any ideas? Here's the code so far (it's obviously wrong to repeat the entire script 3 times, I just don't know how to unify it): <script type="text/javascript"> var v_state = "[@field:Field1]" ; var o_state = document.getElementById("InsertRecordField1") ; o_state.multiple = true ; function f_listbox() { if ( v_state.indexOf(",") > 0 ) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_state[i].value == v_state) { o_state.remove(i); break ; } } var o_st = v_state.split(", ") ; for (var j=0 ; j < o_st.length; j++) { for (var i=0 ; i < o_state.options.length; i++ ) { if(o_st[j]== o_state.options[i].value){ o_state.options[i].selected = true ; break ; } } } } } //window.onload = f_listbox ; document.addEventListener('DataPageReady', f_listbox()); </script> <script type="text/javascript"> var v_state2 = "[@field:Field2]" ; var o_state2 = document.getElementById("InsertRecordField2") ; o_state2.multiple = true ; function f_listbox2() { if ( v_state2.indexOf(",") > 0 ) { for (var i2=0 ; i2 < o_state2.options.length; i2++ ) { if(o_state2[i2].value == v_state2) { o_state2.remove(i2); break ; } } var o_st2 = v_state2.split(", ") ; for (var j2=0 ; j2 < o_st2.length; j2++) { for (var i2=0 ; i2 < o_state2.options.length; i2++ ) { if(o_st2[j2]== o_state2.options[i2].value){ o_state2.options[i2].selected = true ; break ; } } } } } //window.onload = f_listbox2 ; document.addEventListener('DataPageReady', f_listbox2()); </script> <script type="text/javascript"> var v_state3 = "[@field:Field3]" ; var o_state3 = document.getElementById("InsertRecordField3") ; o_state3.multiple = true ; function f_listbox3() { if ( v_state3.indexOf(",") > 0 ) { for (var i3=0 ; i3 < o_state3.options.length; i3++ ) { if(o_state3[i3].value == v_state3) { o_state3.remove(i3); break ; } } var o_st3 = v_state3.split(", ") ; for (var j3=0 ; j3 < o_st3.length; j3++) { for (var i3=0 ; i3 < o_state3.options.length; i3++ ) { if(o_st3[j3]== o_state3.options[i3].value){ o_state3.options[i3].selected = true ; break ; } } } } } //window.onload = f_listbox3 ; document.addEventListener('DataPageReady', f_listbox3()); </script>
  5. After following a couple of threads on the related topic, I still cannot figure this out... I have a report page that shows a chart that has the search above the chart. The search is just a listbox that allows multiple entries by holding control. I have the below script in my footer along with a Virtual Field (Virtual1) hidden that is passing parameter Virtual1. I have a second pie chart on the page below that takes the parameter from Virtual1 as CONTAINS. However, this pie chart will not work based on the script below. I believe the parameter is not passing at all, and I am not sure why. Does anyone see any issue? Here is my current website I am testing this out on: https://simionehhaclaims.weebly.com/dashboard-v2.html The pie chart should be pulling up below the bar/line combo chart but it will not work. <script type="text/javascript"> var fieldName = "Value1_1"; var x1=document.getElementsByName(fieldName); x1[0].multiple=true; function splitAndParse() { var result = ""; var cleanResult = ""; for (var i = 0; i < x1[0].length; i++) { if (x1[0].options.selected) { result += "\""+x1[0].options.value+"\"" + " OR " ; } } document.getElementById("cbParamVirtual1").value = result; } setTimeout(splitAndParse, 20); </script>
  6. In my search form in Reports DataPage, I want to select all the items in a multi-select listbox when my checkbox is checked. Also, when it is unchecked, all the items should be deselected. Any ideas?
  7. How can I use Multiselect listbox to perform a search with OR logic? I have separate search and report as described in the video: https://howto.caspio.com/getting-started/display-results-on-a-separate-web-page/ Does anybody have ideas?
  8. The main goal is to have a pre-defined on-load multi-selected listbox. The listbox element uses Cascading dropDown virtual element. It should hide some sections if 1 element selected and hide others if 2 elements are selected. Can anybody help me with the Caspio or maybe JS solution? Thanks.
  9. I need to set up a multi-column lookup list in the middle of a datapage. I have looked extensively and have not yet found an example. It would seem that others may have had this need. It looks like the existing listbox is not set up, yet, to handle multiple fields/columns. I am open to a HTML block solution, but, I don't know enough HTML myself to know how to build a multi-row, multi-column table dynamically that ties to a table. (the count of qualified records varies depending on the client business being profiled). The solution may be a data array built in javascript with nested for loops, that would feed the HTML table. I also have another multi-column lookup list where the cells/values of one of the columns needs to be editable. Currently records in the listbox control are not editable. I can build a static HTML table that includes edit boxes. The challenge here might be how to make this dynamic off a lookup dataset and insure that changed values in those edit boxes write back to the table they came from. I've even looked at an alternative solution of setting up a separate results table on a different datapage and then embed that in the middle of the datapage. But, currently Caspio does not seem to have the ability to embed a small tabular object from one datapage, into another. (The only way to do this seems to be to mash up two datapages on a webpage... but this does not give the user the in-line experience. Looking for expert guidance. Thanks in advance for any suggestions. Again, it seems like several other Caspio developers would have a use for such a solution. (maybe one is obvious and I am just not seeing it.) Thanks!
  10. In the configure search field area of my report I have an element with four custom values for a user to choose from. I have changed that to a listbox and on the advanced tab marked to allow multi-select. (I have been told this is the only way to allow the report to filter with multiple selections.) Everything works fine, to allow users to filter the report in multiple ways. My issue is that the most common way the users will be filtering the report requires them to select two items (Yes & Undecided). Since I have marked the listbox as a multi-select, one would think I could set multiple defaults on the setup. This, however is not the case and I can only set one as the default. Does anyone know of a way through JavaScript or through another work around to set two options as the default filter; while still giving users the freedom to change the filter? Thank you in advance!!! Element: Bidding Display: Yes - Value: Yes Display: No - Value: No Display: Undecided - Value: Undecided Display: Any - Value: Blank Value (Included to see all items)
  11. Anyone know how to have the listbox height be automatic based on how many records there are in it? At times my users have 2 records & others 5+ records so having a box that auto sizes per the number of records would be optimal.
  12. I have a search form with a multi-select list box and wonder if it possible to adjust the height of the list box? I'd like to avoid having to have the user scroll down to see all the list box options.
  13. I have been trying to use the code in the link below to help remove a blank row appearing at the top of my listboxhttp://forums.caspio.com/index.php?/topic/3170-js-prevent-blank-entries-from-displaying-in-a-dropdown/I couldn't get it to work, and Caspio's Technical Help confirmed that the code won't work in a submission form, only in a report datapage.I tried using a 'view' of the data, but this didn't work either. Anyone got any ideas for removing a blank row in a listbox in a submission form? Thanks
  14. Hi, I have almost completed a project but I am facing problems while sending bulk emails based on some filters. I can pull those emails in list box but not sure how to select all emails from listbox make a string separated by ';' and send emails to all the recipient. I badly need support. Thank you in advance. Regards Ashfak
  15. Hi everyone, I've found this followig javascript code that allows me to move listbox items to one another listbox. The code works as he is on a submission form. But now I would like te reference my database listbox instead of the exemple. Can someone help me? Thanks The name of my "from" listbox is ID_SEARCH_FORM and the "to" listbox is cbParamVirtual1. CSS: <style type="text/css"> select { width: 200px; float: left; } .controls { width: 40px; float: left; margin: 10px; } .controls a { background-color: #222222; border-radius: 4px; border: 2px solid #000; color: #ffffff; padding: 2px; font-size: 14px; text-decoration: none; display: inline-block; text-align: center; margin: 5px; width: 20px; } </style> JAVASCRIPT: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> <script> function moveAll(from, to) { $('#'+from+' option').remove().appendTo('#'+to); } function moveSelected(from, to) { $('#'+from+' option:selected').remove().appendTo('#'+to); } function selectAll() { $("select option").attr("selected","selected"); } </script> HTML: <form name="selection" method="post" onSubmit="return selectAll()"> <select multiple size="10" id="from"> <option value="html">Html</option> <option value="css">Css</option> <option value="google">Google</option> <option value="javascript">Javascript</option> <option value="jquery">Jquery</option> <option value="regex">Regex</option> <option value="php">Php</option> <option value="mysql">Mysql</option> <option value="xml">Xml</option> <option value="json">Json</option> </select> <div class="controls"> <a href="javascript:moveAll('from', 'to')">&gt;&gt;</a> <a href="javascript:moveSelected('from', 'to')">&gt;</a> <a href="javascript:moveSelected('to', 'from')">&lt;</a> <a href="javascript:moveAll('to', 'from')" href="#">&lt;&lt;</a> </div> <select multiple id="to" size="10" name="topics[]"></select> <form>
  16. In a Datapage I want to make a Dropdown box or Listbox but still be able to type a different entry than what is in the list. I want to put the most used in the list but able to type new entries.
  17. I am trying to separate my search and report in two pages, I have 3 virtual fields on my page one is listbox(virtual 3) and the other two are cascadings. I cannot make this to work so when I multi select from listbox, it pulls up cascading values. It should also send the selection to next page separated by OR instead of "," . Here is my code: <script type="text/javascript"> var o_els = new Array("cbParamVirtual3", "cbParamVirtual2", "cbParamVirtual1"); for (var i = 0; i < o_els.length; i++) { document.getElementsByName(o_els[i])[0].multiple=true;} function f_select(){for (var i = 0; i < o_els.length; i++) {var v_fn = document.getElementsByName(o_els[i])[0].value;function splitAndParse(){var result = "";var cleanResult = ""; for (var i = 0; i < x1[0].length; i++) {if (x1[0].options[i].selected) {result += "\""+x1[0].options[i].value+"\"" + " OR " ;} if (x1[0].length > 4) { cleanResult = result.substring(0,(result.length-4)); }document.getElementsByName(o_els[i])[0].value = cleanResult; }}}} document.getElementById("caspioform").onsubmit=f_select; </script>
×
×
  • Create New...