Jump to content

ta33ik

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

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

ta33ik's Achievements

  1. Thanks, @wimtracking2, works like a charm. And much tidier than my prevoius code.
  2. Hello, I have a basic authentication form, which I can't make use the full width of the container. Caspio puts the form in a <div> with display: table tag. When I inspect the page and add width: 100% OR change to display: block, it behaves as needed. But I cannot get to that <div> through any styling ... Datapage is responsive. I'm pretty sure "authentication" doesn't have anything to do, because I checked other forms and they are all in such table styled <div>. Screenshots of different behaviours attached. Any thoughts ?
  3. Hi again. So I'm not giving up that easy. After some further testing I found out this behaviour : - if I load the Google Maps API in the HTML file, it does not work at all - if I load the API in the header of the datapage, it actually works, BUT only AFTER I click on the submit button once and the datapage is reloaded ( destination is Same Form ) Here's a link to the datapage, it's for testing purposes - https://c0ach287.caspio.com/dp/dfe06000e3abc0f66e72412d8197 Maybe I have to add a listener of some kind ? AJAX loading is enabled, responsive also.
  4. Hi, I'm not very familiar with JS. I need a way to add places fast and with validated data into our database. So I came up with the idea to use Google Places Autocomplete for this. Found this - https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform#maps_places_autocomplete_addressform-javascript and with some modifications created a nice hmtl form that does the job fine. Next step was to make it work with the embedded Caspio form. As expected, just putting the code in HTML block / footer and referencing the right Caspio fields did not work. So I'm stuck, any ideas ? Here's code I use : <script> let autocomplete; let address1Field; let address2Field; let postalField; function initAutocomplete() { address1Field = document.getElementById("InsertRecordCompanyName"); address2Field = document.getElementById("InsertRecordAddress"); postalField = document.getElementById("InsertRecordPostcode"); // Create the autocomplete object, restricting the search predictions to // addresses in the US and Canada. autocomplete = new google.maps.places.Autocomplete(address1Field, { componentRestrictions: { country: ["de", "fr"] }, fields: ["address_components", "name", "geometry"], types: ["establishment"], }); address1Field.focus(); // When the user selects an address from the drop-down, populate the // address fields in the form. autocomplete.addListener("place_changed", fillInAddress); } function fillInAddress() { // Get the place details from the autocomplete object. const place = autocomplete.getPlace(); var latitude = place.geometry.location.lat(); var longitude = place.geometry.location.lng(); var faddress = place.name ; let address1 = ""; let postcode = ""; // Get each component of the address from the place details, // and then fill-in the corresponding field on the form. // place.address_components are google.maps.GeocoderAddressComponent objects // which are documented at http://goo.gle/3l5i5Mr for (const component of place.address_components) { // @ts-ignore remove once typings fixed const componentType = component.types[0]; switch (componentType) { case "street_number": { address1 = `${component.long_name} ${address1}`; break; } case "route": { address1 = `${component.short_name} ${address1}`; break; } case "postal_code": { postcode = `${component.long_name}${postcode}`; break; } case "postal_code_suffix": { postcode = `${postcode}-${component.long_name}`; break; } case "locality": document.getElementById("InsertRecordCity").value = component.long_name; break; case "administrative_area_level_1": { document.getElementById("InsertRecordGPSLatitude").value = component.long_name; break; } case "country": document.getElementById("InsertRecordCountry").value = component.short_name; break; } } address1Field.value = address1; address2Field.value = faddress; postalField.value = postcode; // After filling the form with address components from the Autocomplete // prediction, set cursor focus on the second address line to encourage // entry of subpremise information such as apartment, unit, or floor number. address2Field.focus(); } window.initAutocomplete = initAutocomplete; </script> Thanks in advance for any help.
  5. Hi there, I need my users to autocomplete a place through its "Company+Address+Postcode+Country" formula field. OK for now, but when I try to stamp the place selection as place ID, I stumble into not being able to filter cascade by this formula field. Anything I'm missing or a workaround ? Thanks !
  6. Hi, before I post this in the Ideabox, I would like to check if I'm overseeing any Caspio capabilities here. I have the following target workflow - we receive automatically on daily basis files with transactions in a Google Drive folder. Files are semicolon delimited CSVs. They have identical prefixes. I need to import them in a Caspio table, also on daily basis, with as little as possible human intervention. So following problems arise : 1. Any possibility to import SEMICOLON delimited CSV files, I see only COMMA delimited as an option ? 2. Any possibility to import files based on prefix or similar criteria- instead of exact file name ? 3. Any possibility to rename/move files after import, so they are not imported again next day/week etc. ? Thanks for any suggestions.
  7. Hi, any way to change the border color of a form field, when it's on :focus ? Thanks,
  8. Awesome, MayMusic ! Thanks for the neater solution, and for explaining the logic behind.
  9. Hi everybody, I'm new to Caspio and I have my first issue with a trigger, not working as expected. Would appreciate your help here. I have simplified things as much as possible - 2 tables Trips and Legs, one-to-many relationship TripID to LegID. The idea is that a trigger action sums the leg's mileage to the trip's total mileage. Below are both tables' design and data, as well as the triggered action. The issue is that action sums only the existing leg mileage values, but not the newly inserted/updated ones. We have a total trip mileage of 95, instead of 100. Thank you
×
×
  • Create New...