Jump to content

wimtracking2

Caspio Ninja
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    5

wimtracking2 last won the day on August 23

wimtracking2 had the most liked content!

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

wimtracking2's Achievements

  1. @Volomeister and @DrSimi Thank you for your responses, your help was imperative. I was able to complete this using a combination of your suggestions. 🤩 Solution: Step 1: Hide the Download Data button in tabular datapage results <style> nav[id*="PageActionsCtnr"] { display: none; } </style> Step 2: Select the total count of records from the tabular report datapage results and pass it as a parameter (as ?Number_of_Records_Downloaded=) to the submission datapage opening in a lightbox (Opening Details DataPages in a Lightbox - Caspio Online Help) <!-- Button to Open Modal --> <a class="btn btn-primary text-white mt-3 mb-4" style="background-color: #0d1267; color: #fff; text-decoration: none; width: 300px; font-size: 16px; margin-bottom: 20px; cursor: pointer;" onclick=" var recordMsg = document.querySelector('.cbResultSetRecordMessage').innerText; var recordsDownloaded = recordMsg.split(' ')[3]; openModal('Lightbox Title', 'Appkey', '?Number_of_Records_Downloaded=' + recordsDownloaded, 'modal-md'); "> Button Text </a> Step 3: Use javascript to select the hidden download data button and initiate csv file download after the lightbox modal form is submitted and modal closed (added to footer of submission datapage in lightbox) <script> document.addEventListener('FormSubmitted', function (event) { // Close the modal document.querySelector('body').classList.remove('modal-open'); const modal = document.querySelector('.modal-backdrop'); modal.parentNode.removeChild(modal); // Select the download element and trigger the download const downloadElement = document.querySelector('.cbResultSetDownloadLink'); if (downloadElement) { downloadElement.click(); // Simulate a click to start the download } }); </script>
  2. I use Wordpress.org with the Avada Theme and do not have to use the Caspio Plugin any longer ( I think for the last 3+ years). The theme of your website is going to override the style of the caspio form in certain places, so you will need to play around with the css or find a theme that works best with caspio. Like @DrSimi pointed out, if you can see your app is functioning properly when you paste your deployment URL into a browser, the app is fine. If it is functioning different when deployed, your site's theme is causing an issue (see screenshot). When creating your datapage make sure you enable responsive on page two under Content Loading Option - this is checked by default (but may be different based on the caspio subscription you have).
  3. I have an authenticated tabular report datapage pulling data from a table called: Contacts. I want to the user to pay a per record download fee to export the data from Contacts into .csv. My workflow idea is... Have a button on top of the results of the tabular report datapage that says Download Data (however, not the standard download data button) When the user clicks Download Data, a Submission Datapage opens in a Lightbox The Submission Datapage in Lightbox submits a new record to a table called: Huey_tbl_Researcher_Downloads. This submission will (Q1) record the Number_of_records to be downloaded into .csv (Results Count) from the results of the tabular report datapage (Contacts table) the User_ID from the authenticated user (Q1) a calculated $ value (Number_of_records*.20) and a checkbox where the user agrees to the cost (Q2) Once the user agrees and the submission to the table Huey_tbl_Researcher_Downloads is made, the user can then download the .csv file I have the payment automation figured out, I just need to get the submission into this table Huey_tbl_Researcher_Downloads to trigger the payment and then allow the user to download the csv file after agreement to payment. So my questions are: (Q1 from above) How can I take the Number_of_records to be downloaded from the results of the tabular report datapage (Contacts table) to the Submission Datapage in Lightbox to calculate the cost? (Q2 from above) How can I then get the .csv file to the user? Can the download data link from the tabular report datapage be displayed or can the system email them the .csv file? Thanks for any and all ideas!
  4. I have 3 table: 1. Programs 2. Sites 3. ProgramtoSiteAssociation Users can view the Program from Datapage1 (see image) and create an association into ProgramtoSiteAssociation table using Datapage2 (see image) that offers a list of Sites from the Site Table and receives the Program ID from the Program table. If the Program Status (Program Table, Datapage1) is moved to Inactive, I do not want the user to be able to use Datapage2 and create a new recrod in the ProgramtoSiteAssociation table. Is there a way to disable Datapage2 based on the Program table or create a pop-up that tells the user they cannot make an association due to the Program being inactive.
  5. Hi @CoopperBackpack- Yes, I am using 'Same Form' as the destination after record update.
  6. I've implemented these instructions (Enhancing Phone Number Fields With Formatting and Validation - Caspio Online Help) into my update datapage and changed step 5: in the pasted code, replace InsertRecord prefix with EditRecord. The script works on the initial load of the page. However, after an update has been made and the page is refreshed, the script isn't running. See screenshot of what the field shows upon initial page load versus after the data has been updated. Anyone else experience this and find a solution?
  7. @ta33ik and @BCannon I was able to get Google Places API to autocomplete my address and parse the address details into the necessary fields in a Submit Datapage. By adding this code into an HTML Block. The field Address_String is where the user begins to type the address and selects the autopopulated address. Be sure to insert your own API and actually deploy the datapage onto your website (and that your url is listed with the API). It won't work properly if you are just previewing the form on a caspio URL. Good luck! <!-- Load Google Places API --> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=InsertYourAPI&libraries=places"></script> <!-- Set autocomplete input for 'InsertRecordAddress_String' --> <script> document.addEventListener("DataPageReady", function() { var gpaInput = document.getElementById('InsertRecordAddress_String'); var autocomplete = new google.maps.places.Autocomplete(gpaInput); // Listener for when a place is selected autocomplete.addListener('place_changed', function() { var place = autocomplete.getPlace(); // Check if a place was actually selected if (place && place.geometry) { var addressComponents = place.address_components; var address = ''; var city = ''; var state = ''; var zipCode = ''; var country = ''; var county = ''; var latitude = place.geometry.location.lat(); var longitude = place.geometry.location.lng(); // Extracting specific address components for (var i = 0; i < addressComponents.length; i++) { var component = addressComponents[i]; if (component.types.includes('route') || component.types.includes('street_number')) { address += component.long_name + ' '; } else if (component.types.includes('locality')) { city = component.long_name; } else if (component.types.includes('administrative_area_level_1')) { state = component.short_name; } else if (component.types.includes('postal_code')) { zipCode = component.long_name; } else if (component.types.includes('country')) { country = component.long_name; } else if (component.types.includes('administrative_area_level_2')) { county = component.long_name; } } // Setting values in Caspio fields document.getElementById('InsertRecordAddress').value = address.trim(); document.getElementById('InsertRecordCity').value = city; document.getElementById('InsertRecordState').value = state; document.getElementById('InsertRecordZip').value = zipCode; document.getElementById('InsertRecordCountry').value = country; document.getElementById('InsertRecordPhysical_County').value = county; document.getElementById('InsertRecordLat').value = latitude; document.getElementById('InsertRecordLong').value = longitude; // You might need to adapt this to fit your specific data structure and field IDs } }); }); </script>
  8. I have an update datapage that has two multi-select drop downs. See screen shot, dropdown A is highlighted in yellow and dropdown B is highlighted in blue. I can open dropdown A, and click on dropdown B, which then closes dropdown A. I would like to be able to keep dropdown A and dropdown B open at the same time and only close them both at the same time. Is there a way to do this?
  9. @Volomeister Thank you. I was able to set up this workflow as you outlined. I have the datapage and triggered action working. The only hurdle is I ended up using a listbox, rather than a dropdown in the datapage. I would prefer to use a dropdown field, however I was not able to get the JavaScript (below) to work on a dropdown field. Do you have any suggestions? <SCRIPT LANGUAGE="JavaScript"> document.addEventListener('DataPageReady', assignMultiple) function assignMultiple() { document.querySelector('#InsertRecordMultiple_Site_IDs').setAttribute('multiple', true); } </SCRIPT> Triggered Action: For anyone interested in the triggered action used, see screenshot attached and link to post I referenced. I added TRIM to the field extracted from the comma delimited values.
  10. I have three tables: tbl_sites (table with names and locations of sites) tbl_programs (table with name of programs) tbl_site_to_program (table of record ID associations made between the tbl_sites (site_ID) and tbl_programs (program_ID)) I currently create a submission to tbl_site_to_program by using a dropdown list of tbl_sites (site_ID) and by pulling in the tbl_programs (program_ID) as a parameter. This allows me to create one association into tbl_site_to_program at a time. However, I would like to be able to make many associations (submissions to tbl_site_to_program) at once based on multiple selections made using the dropdown list of tbl_sites (site_ID). Is there a way to select multiple records from the dropdown list of tbl_sites (site_ID) and create new records in tbl_site_to_program OR is there a way to use a grid style datapage to accomplish this? See image Site to program association to see the current datapage used (one site can currently be selected from the "Select from Existing Site List" dropdown). The Caspio user interface has a similar functionality using a grid style sheet. See attached image Caspio UI Screenshot.png. User can select multiple datapages at once and complete an action such as move all selected datapages to a new folder.
  11. I have a search form with a tabular report displayed below the search on a webpage, Page 1. When user clicks update, they are taken to a new webpage, Page 2, that opens in a new tab. On Page 2, they can edit the details of the record and take other actions like make an association to this record. The user would then close the tab with Page 2 and return to the tab with Page 1 where their search results are presented in the tabular report. The data they entered on Page 2, however, is not displayed in the tabular report on Page 1 and if they refresh the webpage, their search filters are removed and they have to search again. I am looking for solutions such as: - Add a button that refreshes just the tabular report section of the datapage - Add a button that refreshes an individual record in the tabular report - Keep the search parameters upon refresh of the webpage
  12. @MayMusic How can this be altered to remove the tool tip code from the inline edit text/button within the table? See screenshots, I have added a font awesome icon to the Record Action and the code shows up in the tool tip. Ideally, I'd like to just remove the tool tip from this inline edit text/button. Thanks
  13. Page 1 (screenshots included) allows the user to search records and the records are returned in a table below the search. The user can then click to update a record from the list and they go to Page 2. Page 2 is not a details page, it is it's own datapage. I want to have a link that sends the user back to Page 1 with the existing search parameters they previously entered. The user can also get to Page 1 through another link in the menu, but I do not want the search parameters to pass if the user uses the menu link, only if they use a back button specifically added to return the user back to the search results. What is the best way to accomplish this?
×
×
  • Create New...