10 years ago
7
Topic

Greetings!

I've been using Seblod for about a month now and love how I can customize my content forms. I've just started using the search/list forms and have had some success, but I'm not able to figure this out.

I'm trying to create a search form to let a user pick a date from the calendar widget and find all the articles in that category created on the day they select.

I have my search fields:

-CCK

- category id - hidden

- article created date

- search button

I've tried a few computations and have been able to display all the articles in the category, but I can't get it to show me the articles created on the date I select.

I'm sure this is something fairly simple, but I'm at a loss. Can anyone please help walk me thu this? So you know, I'm PHP illiterate and have basic html & css skills. But I'm a wiz at following directions and copying and pasting code. :)

Thanks.

Get a VIP membership
693 Posts
rpoy
10 years ago
5
Level 1

Hi Deono,

Welcome to the SEBLOD forums.

In the Match section (option#3), you can define how the values are matched.

Hope that helps,

Randy

10 years ago
4
Level 2

So I should create a new field with the instead of using the "Article created" field?

693 Posts
rpoy
10 years ago
3
Level 3

Hi Deono,

Sorry for the confusion.  I use my same site for lots of different kinds of test and screen shots.

In this case you don't have to but in some cases you might to use different fields.  

Lets say you have a content type to purchase concert tickets and you want to allow that field to select only now to the future. Obviously you don't want to buy tickets from a show in the past.  Then if you create a List & Search type, you might want the ability to select all dates.  In this case, you don't want to use the same field for both the Content Type and the Search Type.  Since they are the same field, if you change the functionality in the Content Type, it will also change it in the Search Type.  To solve the issue, you can create a second field date field for the search type, then set the storage to:

Standard|Article|same_name_as_the_content_type_date

Hope that helps,

Randy

10 years ago
0
Level 4

Okay, I think I got it. I'll give it a try tonight and let you know how it goes. Thanks so much.

10 years ago
1
Level 4

Hello again, thanks for your help Randy. I tried to follow your suggestion but I'm not getting this to work properly. Let me try to explain what I have.

In my content I have a field: name= created_date - type=Calendar - format/Object = standard-article-date

in my search form I created a field: name = search_date - type=Calendar format/Object = standard-article-created_date I've set match to "exact"

Now when the search field is empty it displays all the articles, but if I pick a date it shows nothing with "Message - there is no result"

Not sure what I'm doing wrong.

Thanks

10 years ago
0
Level 5

not sure if this matters, but in my content form the created_date field is supposed to show the current date when they submit the form. I tried setting to "read only" but if I do it doesn't show in the form or the content.

187 Posts
Pathos
10 years ago
0
Level 1

Hi,

i think you need to set the storage from the search field to the same 'name' as the field in the content type you want to search in...

So try using

standard-article-date instead of

standard-article-created_date

Greetings,

Joris

Get a Book for SEBLOD