How to set a default value based on a detailed view

bartschepens

New Member
I have made a studentslist. When you select the detailed view of one of the students, you get the details of the student and the activities he participated in.
I would like to have the possibility to insert automatically the current studentnumber in the participationform. The studentnumber is shown in the URL, but how can I extract it from the URL and insert it in the element of the participationform?
 
Thanks for your reply!

I have made a detail view (students) with in the footer a new list view (participation). When I click the 'Add' button of the list view, it would be nice if the student number would be filled with the number of the student whose page you used to get into the add-form.
 
Have you tried the "Custom Add URL" in the list's Links settings? You should be able to use placeholders for query string args, as per the tooltip.

So you should be able to just specify the usual Add Url generated for that list, and add &yourtable___studentnumber={your_query_string_arg}, obviously replacing those names as appropriate.

If you use that list elsewhere, where you don't need that custom URL, you may need to copy the list, only apply the custom Add URL to the copy, and use that for your details display page.

-- hugh
 
I think I'm not completely getting it.

I've a detailed page for the students with an URL like this: .../component/fabrik/details/12/123456?Itemid=138
123456 is one of the studentnumbers

On that detailed page I have a list with the participation entries for student 123456
This list is made with {fabrik view=list id=13 participation___studentnr=[rowid]}

The Add-page for student 123456 has the following URL: .../component/fabrik/form/13/?participation___studentnr_raw=123456&Itemid=

What do I have to add in the Add URL settings?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top