• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Search form to show the record in form view

pkjoshi

Active Member
Is it possible & how, I can make search form to redirect to the detailed view of the record instead of the list view.

for example I have created a list of students with their grade in the list and a search form, which work fine, if I enter the roll number of the student, the list is shown with only the roll number entered for the student.

What I want is that instead of showing the list it show the record in detailed view instead.
 
Is the 'roll number' guaranteed to be a unique key, i.e. only one row in your student table will have that number?

If so, instead of redirecting to the list page from your form submission redirect plugin, you could redirect to the detail view of the form like this:

Code:
index.php?option=com_fabrik&view=details&formid=123&rowid={___roll_number}&usekey=roll_number

eplace 123 with your actual numeric form ID.

Replace ___roll_number with whatever the full element ID for the roll number is on your search form.

Replace the last roll_number with whatever the short element name (i.e. without the table___ prefix) of the roll number is on the student form.

Turn off 'use as search form' (or whatever that option is called on the redirect plugin, I forget).

Of course, this assumes that roll number is the ONLY thing you are searching on from the search form.

If it isn't, and you only want to do this version of the redirect if a roll number is provided, you'd have to have two redirect plugins, with condition code that check to see if {___roll_number} is empty on the search form submit, which run either the list search redirect if it isn't, and the details redirect if it is.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top