9 years ago
4
Topic

Hi,

I'm new to SEBLOD and I can't figure out how to do something I thought would be easy.  I want to create a Search and List form with the following criteria:

<fieldName> defined?:  <checkbox>

If the user turns the checkbox on only those articles with a value for <fieldName> will be included in the results. (<fieldName> is a string/text).

Thanks in advance for any help!

Get a VIP membership
572 Posts
_jrmo
9 years ago
3
Level 1

Hi dr,

Let's say you want to check if something called "Property1" is defined.

On your Admin Form or Site Form (when the content is stored) add a radio field called "Property1 defined?" with options "Yes=1" 'No=0". Default value of "0"

Now, add a conditional state on this radio field that makes the field "Is filled by" "1" when "Property1" is "filled" - see the attached manual if you aren't familiar with this. You can add this radio field in a "hidden" position so the user doesn't see it.

Now add your content items. When you enter a value for "Property1" it will change the radio field to have "Yes" selected.

Then, on your search form, include the radio field. This should solve your issue.

_jrmo

dr
9 years ago
2
Level 2

Thanks _jrmo, that really helped getting my head around how this works (first CMS). I’ve done a lot of conditional stuff now.

As you’re an admin, can I suggest two changes to your documentation that would make things easier?

  1. The tutorial you quoted is not in the tutorials list, or I would have found it J.I found it now in the ‘Videos’ list.I will review the videos list because it looks like a lot of good stuff.But can I suggest placing your videos in both, or removing the tutorials list entirely because it’s not updated, to avoid missing this?
  2. The documentation for conditional states for the ‘is Filled by’ is ambiguous.It says “- is Filled by: the id of a field you want to retrieve the value.
    In order to retrieve a custom attribute, use fieldid@attribute”.  What’s happening is it filled in by the ***id field in the html***, which is not the id of the field in the CMS.Hence I was putting in ‘302’ instead of ‘art_title’.That one took me hours! I was pulling my hair out because I knew I was doing something stupid.I would suggest saying ‘the name(alias) of the field’ or something like that to make it clearer.

Thanks,

-dr

572 Posts
_jrmo
9 years ago
0
Level 3

Hi dr,

Thanks for the feedback. I completely agree with you about your first point and it's something we are working on. We are consolidating "manuals" "videos" and "tutorials" in to a central "knowledge base" which is governed by a global search, but this change may take some time. 

Regarding the second point. Yes, and that will be part of an ongoing UI improvement project that we will be working on throughout the year.

Cheers,

_jrmo

188 Posts
uriel
8 years ago
0
Level 3

Hello. 

Qual é a real sintaxe ? 

What is the real syntax? I can not.

show me how. 

Please. 

Get a Book for SEBLOD