This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
71 Posts
Filip
6 years ago
3
Topic

Hi,

First and foremost, thanks for all the help so far! Now, on to the next challenge...

I have included a field where the user submit the year that a document has been published. But, as I only wanted the actual year, and not the full date, I created a simple select covering 1945-2013 rather than using the calender. Now, in the list I would like the user to be able to select a given time period, for example 2000-2010, and the list would include all the relevant articles.

For now, I can only select one specific year in the list search since I only set it up as a simple select. Is there some way I can use the submitted content to create this type of search function? Or is there some other type of field that would be more suitable and that would allow this kind of function?

Any help would be greatly appreciated!

Get a Book for SEBLOD
6 years ago
1
Level 1

Hello,

first thing, if you want to make a search on years, you must specify the storage as int(11). This parameters is set when you set the storage fo rthe field. On the right you have a checkbox which let you choose the type.


After that, in your search, you need two fields with the same storage for doing the range, and with those matches (option 3)


Best regards.

Lionel

71 Posts
Filip
6 years ago
0
Level 2

Thanks for the help!

Unfortunately I did not get it to work. Have changed the storage for my simple select and set up two new fields (but using fieldx) under the same storage. The problem is that in the search function, nothing happens when i select the relevant years and submit the query...

I also tried to create the same type of field (rather than a field x), but it did not make any difference.

Is there any typical newbie mistakes that I may have done?

71 Posts
Filip
6 years ago
0
Level 1

Got this to work by creating an exact copy of the same type of field (using your instructions)...

Had been trying to use a field x on this instead.

Thanks!

Get a VIP membership