Jump to content

Dynamic Selects (Commercial Module)


kongondo

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. 

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...

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?

Link to comment
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!

Link to comment
Share on other sites

  • 6 months later...

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.

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

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
Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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?
Link to comment
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!

Link to comment
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.

Link to comment
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. 

Link to comment
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
Link to comment
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

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By Sephiroth
      Hi guys, so this thought came to my head after seeing only a commercial application on Envato Market ( CodeCanyon ), An Hotel application platform using Processwire, because lately as a result of my country, I can't easily do alot of things to get paid via PayPal and there isn't much commercial avenue with Processwire community e.g Marketplace or a store, my question is has anyone ever thought of selling solutions built with Processwire on the themeforest market or experience with that. It is just something I'd figured to raise up here, because it is one of the easiest CMS to have installed and deployed with an application. Hoping to get feedbacks and insights.  
    • 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
×
×
  • Create New...