Jump to content

Mikie

Members
  • Posts

    191
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mikie

  1. Hey glad you figured out, just realised I'd misunderstood previous post.
  2. A few things... With the axios call, try querying the relative and not the absolute url. Also, take note of the trailing slash on the url, sometimes that can trip you up depending on your template settings. Finally, you probably don't need to set the entire response to your Vue data object, with axios you are looking for response.data. axios.get('/ajax-actions/test-api/).then(response => (this.info = response.data)); If you need to keep the full absolute url, or if you are calling the api page from a different url, then look into CORS. Setting the header below on your template should be enough, depends on your setup (eg see this topic for issues with CORS when using procache). <php header('Content-Type: application/json,charset=utf-8'); header("access-control-allow-origin: *"); //... ?>
  3. Hey @Robin S and @abdus thanks for the tips, both look like viable solutions and are good to know!
  4. Rather than starting a new thread, I'd like to bump this as I am after the same thing. My use case is that I have some file fields that accept html5 video files (webm / mp4) for short video loops that I'd ideally like to be under 2mb, but I can't stop the client from being lazy and uploading much larger files anyway. I'm going to write a module to achieve this restriction for now, but I was surprised it wasn't available out of the box. Thanks!
  5. My problem from above, which was that Form Builder's form-builder.php template needed to be ignored by latte is now resolved. Tested the update and all working fine. Thanks @tpr!
  6. Hey @tpr, Thanks for the module. Switched over from Twig and really enjoying the custom filters, makes things much easier. Just wondering about embedding a Form Builder form. As Form Builder creates a form-builder.php template which gets called via Ajax when embedded in another template, I am running into issues for obvious reasons (no .latte view file etc.). I know there are workarounds and different form builder options, but for this use case I feel like am missing something, like the ability to bypass the view or turn latte off on a template basis. Thanks again.
×
×
  • Create New...