-
Posts
11,132 -
Joined
-
Last visited
-
Days Won
366
adrian last won the day on November 25 2025
adrian had the most liked content!
Profile Information
-
Gender
Not Telling
-
Location
Canada
Recent Profile Visitors
49,118 profile views
adrian's Achievements
-
adrian started following OAuth2Login , FieldtypeTimezone - Dynamic Timezone Field with DST Support , $config->ajax not being set and 4 others
-
timezone FieldtypeTimezone - Dynamic Timezone Field with DST Support
adrian replied to maximus's topic in Modules/Plugins
Thanks for this @maximus - timezone DST changes are definitely an annoyance in development. I am curious though why you have a limited set of timezones available, rather than the complete set? I feel like it might be particularly problematic if you rely on a service like https://ipapi.co/ to determine the user's timezone from their IP address. Many of the timezones returned from that are not likely to match your list. I can see that the way you have organized them makes it much simpler for user selection, and maybe that is your primary goal but I still wonder about how it might impact its functionality. -
What do you mean by "not as reliably"? Does it fail sometimes? I use this in so many places and I don't think I've ever had an issue so perhaps there is something else at play here.
-
<?php namespace ProcessWire; if($config->ajax) { bd('AJAX request detected'); echo "Replaced page content"; exit(); } ?> <script> function loadlist(segment='') { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("main").innerHTML = this.responseText; } }; xhttp.open("GET", "<?=$page->url?>"+segment, true); xhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhttp.send(); } </script> <div id="content"> <div id="main">Basic page content</div> <p><button onclick="loadlist('')">Load List</button></p> </div> Note the replacement of the text in "main" and that Tracy detects the AJAX request.
-
Sorry, it needs to be after the open line. I just tested here and it works as expected when placed after.
-
Add this line before your xhttp.open line and it should work: xhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
Lovely!
- 6 replies
-
- 2
-
-
- inputfield
- checkboxes
-
(and 2 more)
Tagged with:
-
Looking for easiest way to turn off autocomplete for admin login prompt
adrian replied to gRegor's topic in General Support
It might be ugly and not recommended, but I set the autocomplete value to a uniqid() value and it seems to work to actually prevent browsers autocompleting fields. -
Sorry about that @Nick Belane - should be fixed in the latest version.
-
@froot - please try the latest version.
-
Thanks for the report @olafgleba - it should be fixed in the latest version.
-
@ryan - I don't really know the best place to post this, but the modules section search is really not a great experience at the moment. If you search for something, the results are displayed, but the search box is no longer available so you can't search again without clearing the ?t=Modules&q=searchterm from the URL.
-
@flydev - thanks for this module. I am curious about your plans for it or if you know of any alternative PW module. I am looking to start using it, but definitely want the ability to register users as well (rather than just signing in existing users). I see you have the listed as something that is planned. I am curious if you came across any particular stumbling blocks getting that set up, or whether you just didn't find the time. I am tempted to tackle adding that functionality myself so wanted to garner any insights from you about potential issues. I am honesty surprised to see so little discussion about SSO on the forums - these days it seems like most sites that require frontend users to register offer this option.