Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/24/2020 in all areas

  1. And one more http://youmightnotneedjquery.com/
    1 point
  2. And another one: https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/ Helped me once when I couldn't trigger events using vanilla js.
    1 point
  3. Totally different and strange... yet absolute awesome! Love those tracks right now... while listening you might know why. Follow their channels. They are AWESOME!
    1 point
  4. I’ve just released the first version of the ProFields Combo field and it’s now available for download in the ProFields support board download thread! Rather than writing a long post today, I’ve instead focused on writing the Combo field documentation. The documentation page includes a lot that you may already know from previous posts, but it also includes a lot of new details that haven’t yet been posted. Please consider this version to be a development/beta version. It’s the first release and hasn’t had a lot of testing yet, so consider it not yet ready for full production use. Though if you get a chance to test it out, please let me know how it works for you. I appreciate any feedback you have. A couple things I haven’t yet tested thoroughly enough yet are exporting/importing of Combo fields or pages using combo fields. I also haven’t done enough testing in FormBuilder yet. So I’d recommend avoiding use of PW’s field or page export/import functions with this, or using in FormBuilder, at least for a few days. By next week I will have tested those things and made any necessary updates. Thanks for reading and have a great weekend!
    1 point
  5. I've updated Combo to use @Robin S strategy for moving the subfields around the page editor and posted it in the ProFields download thread as v2. The definition is available for any Combo subfield and it's very simple, but I figure it's something at least to start with.... it's working and ready to use. It does use a datalist-based autocomplete, so you don't necessarily have to remember all your field names. Thanks Robin S. for the idea on how to make it work, it seems to be a clean and reliable way to do it.
    1 point
  6. The methods for setting new options for an Options field via the API seem to be a bit convoluted - I think it's probably an oversight and it would be worth raising a feature request at GitHub. There's a method that seems to be primarily intended for the admin back-end: setOptionsString(). You can use it but the way the options are defined (string with line break separator) is a bit weird for API use and it's not easy to get it to play nicely with existing options. $f = $fields->my_options_field; $manager = new SelectableOptionManager(); $options = 'red green blue'; // you can also set IDs and values if needed $manager->setOptionsString($f, $options, false); // if last argument is omitted/true you will remove any existing options Otherwise you could manually create SelectableOption objects, add them to a SelectableOptionArray, and use addOptions(), deleteOptions(), setOptions(), etc, with that SelectableOptionArray. See the module source code. It's hardly a simple process though. I think what's needed are methods to go from options to PHP array and PHP array to options.
    1 point
×
×
  • Create New...