Tutorial 'Creating Search Form' is not correct

e-manuel

New Member
In the category : 02 - Digging Deeper there is a tutorial with the title 'Creating a Search form'.
What is missing from the tutorial are 2 main points :

1) In the new form we create in order to make a search, in the Tab 'Form Processing' and in the option : 'Record in Database' we must set the option 'NO' , otherwise if we leave the default 'YES' in every search a record will be created in the table. We want the table for search and not for Data.
This is something that is not mentioned in the tutorial.
2)We must UNPUBLISH the field element Date Time which is automatically created when we create the form, otherwise every time we make a Search from the form the field Date Time participates in the query and it doesn't bring the expected query results in the redirection plug-in list.

Please correct the tutorial !
Thank you !
 
As you can see the tutorial is an old Fabrik2 one where a new form (without list) may have had the default of record in database = no (I can't rember). It's still showing the principle but you can't rely on every single detail.

You are correct, you don't need to record in database but you may want to if you want to have a search protokoll.

date-time is only created IF you leave "record to database"=yes (and yes, in this case it makes sense to disable it)
 
Yes, date time might be created when you have 'record to database = yes', but if we initially make the mistake and set it to yes since that was not mentioned in the tutorial and then change it to 'no' the field element will still remain there. So in this case you have to either delete the field or unpublish it otherwise the query doesn't work because the date-time takes part in the query.
It shouldn't take part in the query anyway because the field although is part of the table, is not part of the form through which we make the search.
Thanks for your reply !
 
This date-time element IS part of your form (you'll see it in the element listing of your search form).

But it is the default date-time element created during list creation.

This element is set to hidden and defaulting to the current time (it's thought to log the time of record creation).
It's correct that it doesn't make sense to use such an element in a search form.

But Fabrik doesn't know which of your elements you want to use (you may e.g. have a hidden element with the userid which you want to include in your search) so it's up to you to check the form elements and disable the ones you don't want.

And yes, a WIKI about search forms is still missing (feel free to create one;)).
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top