Jump to content
kongondo

Dynamic Selects (Commercial Module)

Recommended Posts

Hi there,

I was just testing the module out, very cool. I wonder, Is there any way to redirect the latest selection to it's page (on frontend using MarkupDynamicSelects)? For example you select continent, then country, then city and you click on "Go" button which redirects you to the city page you have selected. 

Share this post


Link to post
Share on other sites

Hi @Maverick.

Thanks for you custom.

Currently, not out of the box. but should be very easy to achieve using your own JavaScript. It would go something like this

  1. Render your DynamicSelects form
  2. Next to it, in your template file, add your Go button or link
  3. Using JavaScript (e.g. jQuery) disable that button or link
  4. Once a 'last' selection is made, using JavaScript, change the value of your Go button/link to the URL of the last selection. For instance, if a link, we would change its href. 
  5. On click, the user gets redirected to the selected 'URL'.

Initially, I was thinking the developer could build in the 'URL' themselves, i.e. build it client-side using JavaScript, from the select option's label. For instance, if we have a city Berlin, we would build our ProcessWire URL off that. But that is not very friendly. I think it will be better if a I added a third $options argument to MarkupDynamicSelect's render() method. You can then specify what extra info for the results to return, e.g. url was passed in the options, it would result in:

<select>
  <option value='1234' data-url='/continent/country/city-page-1/'>City 1</option>
  <option value='1235' data-url='/continent/country/city-page-2/'>City 2</option>
  <option value='1236' data-url='/continent/country/city-page-3/'>City 3</option>
</select>
   

You would then grab the selected option's data-parameter, e.g. in the case above, data-url, and do whatever you want with it. 

Is there any other value you think would be useful to return other than url? i.e. what other data-xxx would be useful?

Thanks.

Share this post


Link to post
Share on other sites

Hi,

Nice module, but I'd like to be sure.
If a value isn't available, there's no way to input into the database, right? [cfr autocomplete].

Kind regards.

Share this post


Link to post
Share on other sites

Hi @videokid,

Thanks for your interest in the module. Dynamic Selects only works with existing values. So, no, there's no way to input new values. Given that values can be anything from a list of users, to fields, to page titles, file or image names, such a feature will be quite the task to pull off. What did you have in mind?

Share this post


Link to post
Share on other sites

Hi @kongondo,

well, currently I have this set-up:

- brands
 |--> Alfa Romeo
     |-> 159

 |--> Volkswagen
     |-> Golf

in the back-end two page-reference fields, option autocomplete:

  [ brand ] [ brand_type ]

So, I was thinking, after choosing the eg VW,  a list of models would come up.... and if there's a new model, just type it in [autocomplete] and it would be added as child under the brand....
Does it make any sense what I'm trying to explain here?

In my case ' page title ' would be sufficient.

Thank you already for your answer!

Share this post


Link to post
Share on other sites

@kongondo

Thanks for the response.... Back-end, sure, I'm not looking for a front-end solution.... 
Of course I haven't used your module, but my gut feeling says that indeed the 'relationships'-thing might be it... 

Thanks already for putting some thought into it....

Share this post


Link to post
Share on other sites

Hi @kongondo, I have just purchased the module and started testing it. One thing I ran into immediately is that it does not seem to support multilanguage text fields, even Title does not show up in the Data Source options. Are you aware of this? 

For now I can bypass this by adding an extra single language textfield, but I would expect it to work out of the box. Perhaps just by showing the Default language content.
For large existing multi-lingual sites this could be a big issue.

Share this post


Link to post
Share on other sites

Hi @eelkenet.

5 hours ago, eelkenet said:

I have just purchased the module and started testing it.

Thanks for the purchase.

5 hours ago, eelkenet said:

One thing I ran into immediately is that it does not seem to support multilanguage text fields, even Title does not show up in the Data Source options. Are you aware of this?

Yes I am. This will be added in the next version. I'm working on it for the next couple of weeks.

Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Dynamic Selects version 005  (released (16/07/2017))

Glad to announce that the latest release of Dynamic Selects is now available for Download/Purchase.

Changelog

  1. Dynamic Selects is now fully multi-lingual! Thanks @eelkenet for reminder :). Relevant fields and labels now shown in user's language if available, with fallback on default if not.

Screenshots

Backend Dynamic Selects Fields

ds_backend_field_edit_ml_version_5.thumb.png.e7f71069e87c0e261ddfcac9ed90d1c1.png

Demo

Backend Dynamic Selects Page Edit

ds_backend_edit_ml_version_5.thumb.gif.7dc3d1dde1f5e90d983f75f7d24079ca.gif

Frontend Dynamic Selects

ds_frontend_ml_version_5.thumb.gif.bd07eac597283696d7d629d77d9391c3.gif

  • Like 4

Share this post


Link to post
Share on other sites

Renewals and Resend Links

Hi,

Renewal and resend links pages for Dynamic Selects have been added. Use renewals if you wish to renew a Dynamic Selects order whose subscription has expired (1 year). Resend are for orders that are yet to expire. Use this if you can't find or didn't get the confirmation email sent after your purchase.

  • Like 1

Share this post


Link to post
Share on other sites

Hi all. 

I am intending to ONLY support ProcessWire 3.x starting from the next version of this module. Please have a read here and let me know what you think. Thanks.

Share this post


Link to post
Share on other sites

Will this module work in a repeater?

My use case is that the client needs to make a selection of a page, and then if that page has any children, it will show those as selectable.
But they may need to do this multiple times on one page, hence the need for repeater support.

I tried using the built in dependent select, e.g. parent=page.page_select_field, but this doesn't seem to work in a repeater (still references the edited page i think)...

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Macrura said:

Will this module work in a repeater?

I have never tried it in a repeater but I do have my doubts. I'll test and let you know. 

Edit: I've just tested...and, we'll what do you know, it works! Well, mostly :).  I'll just need to sort out an issue similar to this one in VPS (a solution exists [scroll down a couple of posts]; just needs to be implemented). Otherwise, at the moment, the selections are affecting each other (selects have identical IDs since they are just being, er, repeated). No ETA for now though, but definitely on the cards.

Thanks for your interest.

Share this post


Link to post
Share on other sites

wow thanks - great!  I will purchase this anyway because it does looks very useful either way...

Share this post


Link to post
Share on other sites

I'm just trying to setup my first select and in the third column (continents, countries, regions) regions which should be the value if I put title I get the parent title, and there's no multi-page option as in the example.  Thanks.

image.thumb.png.c1c855b5c659426c1c8b2e74c4f4af53.png

 

image.thumb.png.6618072ea62fc729993a09b41ca639a2.png

Share this post


Link to post
Share on other sites

Hi @hezmann,

Thanks for the purchase.

I've just tested in ProcessWire 3.0.85 and it works fine.

  1. What's your setup? ProcessWire version?
  2. What's the name of your multi page field?
  3. Is that multi page field setup properly? (i.e., does it work fine outside DS)
  4. Are other page fields (single and multi) listed for selection?

Share this post


Link to post
Share on other sites
On 1/29/2018 at 3:17 PM, kongondo said:

Hi @hezmann,

Thanks for the purchase.

I've just tested in ProcessWire 3.0.85 and it works fine.

  1. What's your setup? ProcessWire version?
  2. What's the name of your multi page field?
  3. Is that multi page field setup properly? (i.e., does it work fine outside DS)
  4. Are other page fields (single and multi) listed for selection?

Hi @kongondo,

Thanks for getting back to me.  I figured out (duh!) that I actually needed to create the regions field to store the information - when I did that it came up in the third data source.  However, it's now coming up blank even though there are pages (ie  I have Europe->Germany->Bavaria but that's not showing up in the drop-down).  So, in answer to your questions..

  1. ProcessWire 3.0.62
  2. regions
  3. it is setup now and does work outside DS
  4. yes

Thanks!

Share this post


Link to post
Share on other sites
7 hours ago, hezmann said:

However, it's now coming up blank even though there are pages (ie  I have Europe->Germany->Bavaria but that's not showing up in the drop-down).

Hi @hezmann

OK, progress! Good :).

Just to be clear. 

  1. You have a page called Europe
  2. You have a page called Germany and its parent is Europe
  3. Inside the template used by the page Germany, you have a page field called regions.
  4. The page field regions has been set up to allow for selection of pages meeting a certain criteria (I mean the page field settings, not DS)
  5. Editing the page Germany, in the field regions, is Bavaria selected and saved for Germany? A screenshot of your regions field when editing Germany would help, thanks
  6. Is Bavaria published?

If the answer to #5 is NO, then Bavaria needs to be saved for Germany. DS only returns saved values. 

A screenshot of your page tree showing Europe Germany and Bavaria would be helpful too.

If the above doesn't resolve the issue, is the site remote? Any chance I could get a temporary login to have a look?

Thanks.

Share this post


Link to post
Share on other sites
1 hour ago, hezmann said:

I actually have a page Bavaria with a parent Germany with a parent Europe.  Can it work like that? 

Thanks.

Yes, it can, but I am a bit confused. What is the role of the page field called regions then? From your description, you need the following relationships

  1. continent > none
  2. country > child
  3. region > child

Relationships are read 'backwards', so to speak. So, region (e.g. Bavaria) is a child of country  (e.g. Germany) and country is a child of continent (e.g. Europe). Continent has no 'backward' relationship (none). 

As for values for country and region, you can select any valid (as per DS docs) field to display for the selected child. E.g. title, population, etc, as long as those fields are present in that page. If they are present but not populated, then the select (i.e. the DS inputfield you see when you edit the page with the DS field) will be empty.

If you still can't get it to work, could you please post a screenshot of your page tree, Germany, Bavaria and the Details Tab shot of your field regions? If you wish, you can also PM these or email them to me. 

Share this post


Link to post
Share on other sites

I think I get your setup now. 

Europe
	Germany (has page field 'regions' whose selectable pages are its children)
    		Bavaria
        	Hamburg
        	Thuringia

My previous solution is for when you want to list regions in a country where a 'hike' is possible. What you are after, I think, is to show only the regional hikes that have been undertaken/completed in a specific country. For instance, in the country Germany, you have several pages saved in its page field 'regions'. Those saved pages are the regions where hikes have been completed.

If this is the case, then you'd have to do it a little bit differently. I'll get back to you later with suggestions. Thanks.

Edited by kongondo

Share this post


Link to post
Share on other sites

I'm more cataloging long distance hikes around the world.  Some are only in one region - ie King Ludwig's Way which is in Bavaria, some are much longer and pass through multiple countries/regions - ie any of the GR routes.  I was able to get the select working using 

 

image.thumb.png.b33e0dff3eaca0a2b76a3039d77aebfe.png

 

The information is being stored in the database as seen here...

 

image.png.2fd9bfc94c052a7c6a706da8e6e8faa2.png

 

But for some strange reason I can't filter it with Lister...

image.png.87b4154cde538db95fd0971bfbf11e93.png

 

Share this post


Link to post
Share on other sites

I tried putting it in a repeater.  It get's the Continents but then just has the spinning wheel for the other drop downs and doesn't get any values.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Breadcrumb Dropdowns
      Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.

      Installation
      Install the Breadcrumb Dropdowns module. The module requires ProcessWire >= v3.0.83 and AdminThemeUikit.
      There is a checkbox option in the module config that determines if the breadcrumb dropdowns will include pages that the user does not have permission to edit.
      Features/details
      The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages. In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page. Unpublished and hidden pages are indicated in the dropdowns with similar styling to that used in Page List. If the option to include uneditable pages is selected then those pages are indicated by italics with a reduced text opacity and the "not-allowed" cursor is shown on hover. There is a limit of 25 pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy. If the current user is allowed to add new pages under the parent page an "Add New" link is shown at the bottom of the breadcrumb dropdown. If the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. Overriding the listed siblings for a page
      If you want to override the siblings that are listed in the dropdowns you can hook the BreadcrumbDropdowns::getSiblingsmethod and change the returned PageArray. For most use cases this won't be necessary.
      Incompatibilities
      This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method.
       
      https://modules.processwire.com/modules/breadcrumb-dropdowns/
      https://github.com/Toutouwai/BreadcrumbDropdowns
    • By FrancisChung
      Hi,
      I was wondering if people have any recommendation or share their experiences with websites that either provide free or commercial website templates?

      Thanks in advance!
    • By Aleksey Popov
      Hello. My name is Alexey, I'm a designer.
      So it turned out that I got carried away by ProcessWire and made several sites (links below the post). I have a desire to make template sites for sale on various markets (where possible), as well as on my own site.
      I'm clear understand the difference between ProcessWire and WordPress and it's not about templates, but about simple, ready-made solutions that can been easily customized if necessary.
      I would like to discuss here the possibility of such activities in particular the rights of modules authors. Consider for example a hypothetical site: 
      A simple corporate site in which (commercial and non-commercial) modules are used:
      AdminTheme BatchChildEditor ClearCacheAdmin EmailNewUser FieldtypeColorPicker FieldtypeMatrix FieldtypeMultiplier FieldtypeRangeSlider FieldtypeRepeaterMatrix FieldtypeSelect FieldtypeTable FieldtypeTextareas FormBuilder ImportPagesCSV InputfieldCKEditor MarkupSimpleNavigation MarkupSitemapXML PageEditPerUser PageTreeAddNewChildsReverse ProcessCustomUploadNames ProcessDatabaseBackups ProcessExportProfile ProcessTemplateEditor ProcessWireUpgrade TextformatterAutoLinks TextformatterVideoEmbed  
      Obviously the use of commercial modules should be discussed with Cramer (or others) personally but can I use non-commercial ones in the similar projects? 
      In general maybe this has already been discussed?

      ——
      Some of my works of PW:
      http://www.twenty-studio.ru/
      http://ekaterinburg.guide/
      http://bonus.koriphey.ru/
      http://trustural.ru/
      bonus.koriphey.ru
      http://plus.koriphey.ru/
    • By kongondo
      Variations
      Released 29 May 2017
      Variations is a simple yet powerful commercial ProcessWire module that allows website editors to create attributes and their values and from those generate variations of any entity, most notably products.
      The module consists of  FieldtypeVariations and InputfieldVariations as well as a ProcessVariations for managing variations configurations and attributes.   Setting up the field is quite easy.   First, create a field of type Variations. Define some custom inputs that will need to be directly edited on the page containing the field, for instance a product price, SKU, etc.   Secondly, via the Inputfield, create a couple of attributes.   Thirdly, create a variations configuration and add the attributes and values you want in the configuration. Link that variations configuration to your page and the module will automatically generate all possible combinations (variations) of the attribute values in that configuration. These, together with the custom inputs you created when setting up the field will be displayed on the page (e.g. a product page), ready for editing. This makes this module quite unique; variations are defined at the page-level rather than at the field level. This presents lots of possibilities such as infinitely reusable attributes and variations configurations.    For those using Padloper, integration with the e-commerce platform is quite simple as demonstrated in this tutorial.  The module consists of 4 modules
      ProcessVariations FieldtypeVariations InputfieldVariations VariationsCustomTableManager (autoload module, working behind the scenes) Video Demo: https://youtu.be/T93nn96UL8o
      Documentation: https://variations.kongondo.com/
      Shop: https://processwireshop.pw/plugins/variations/
      Requires: ProcessWire 2.5 or newer
      Features
      Easily create variations of anything, including products for e-commerce websites, etc Create an attribute once, use it everywhere, multiple times, picking and choosing all or only the attribute values you want Bulk editing of variations configurations and attributes Reusable variations configurations Works with Padloper out-of-the-box with minimal coding User-friendly, intuitive and easy to set up
    • By kongondo
      Introducing Variations, an Input- and Fieldtype for product variations and their attributes.
      Product variations is a topic that has been coming up now and then, especially in the recent past.  This module seeks to fill this gap. Though it's in its early stages of development, it is already functional and can be used as is. I decided to make an early announcement (modules development forum) in order to get early feedback from potential users. 
      The module is an alternative take on how variations can be built for a product. Imagine the ubiquitous T-Shirt. The product could vary by ...Size, Colour, Material, etc...These variations could in turn have internal variations, i.e. attributes....so, Size [Small, Large], Colour [Red, Blue]...etc; you get the drift.
      The usual approaches to building variations have been either to use Multiple pages, Repeaters, Page Table, Table or Matrix (limited to 1x1 variations). In this module, we do it a bit differently.
      First, the variations occur not at the Field level (meaning all product pages would have the same variations and attributes for each template) but at the page level. Secondly, there are no multiple pages for each variation and/or attributes; a product is a single page. The variations and their attributes are defined by site editors at the page level. Once a variations configuration has been defined, it is applied to the page and all possible combinations are generated (i.e. the Red,Small,Cotton; Red,Large,Cotton, etc) in the Inputfield. There is no limit to the number of variations and attributes that can be defined, although you will be amazed at how quickly the combinations grow! Prices are entered for each combination when editing the page. Combinations without prices are not saved to the database. Please note that prices cannot themselves vary at the page-level. Meaning, you cannot have ONE variation configuration that has different price inputs per product in the same FieldtypeVariations field.
      The module ships with an API for outputting variation combinations in the frontend. Search, database and in-memory work as normal in the frontend. In the backend, DataTables provides a nice paginated, filterable table. Prices can be entered on any pages (of the table) without loss of data (meaning you can enter prices on page 1, scroll to page 10, enter more prices, filter or search the products table, enter more prices and finally save; no data will be lost).
      I still have a couple of ideas and plans pending but would love to hear from you, thanks.
      Below is a short video demo of the module in its current state. Things may/will change, both UI and features. Btw, the Fieldtype, although primarily targeted at commerce applications, is by no means limited to this. Other uses requiring combinations of whatever number of variables are very much within the remit of the module.
      Planned/Hoped for features
      Import/Export product variations and attributes (Excel, etc) Full integration with Padloper (I will have to  discuss with @apeisa) SKU fields for each product variation Add/Remove extra subfields, e.g. multi-currency prices (currently there is only 1 input for each product variations' price) Product variation images? Etc... Please not this module is not related to this other planned module (but it may eventually).
      Sneak Peek Demo
       
       
×
×
  • Create New...