83 Posts
squareweb
5 years ago
4
Topic

Hi,

Trying to develop as much as possible with core SEB/Joomla functions without custom-coding I do encounter an issue which is boggling my mind on how to solve this. This is the case:

I create many forms with SEBLOD. Each form has its own characteristics (poll / questionnaire / etc.).

In my “workshop-system” I present my logged-in customer with a list containing each session he/she has attended (see image). Each session contains a title-field of a form which should be triggered (showed when clicked upon).

Essentially each form is a specific content-type (all in the same category “myForms”).

When the session-list is presented to the user, he/she should be able to click on a title/button/icon/link and the desired form should be presented.

If the form-content-type for this user already exists the form should open in EDIT-mode, if NOT the form should open in ADD-mode.

So how to link to the right form (content-type) from within the list, by clicking on the title for example? :

if(condition-1) ==> show form-1 (content-type-1)

if(condition-2) ==> show form-2 (content-type-2)

if(condition-x) ==> show form-x (content-type-x)

Thanks in advance.

Get a VIP membership
4229 Posts
Kadministrator
5 years ago
0
Level 1

Depending on your needs you have at least 3 options 

  1. create a field with link to each form, than use conditionals to show the right one
  2. create a field with target forms ids (can be simple select with form names as text and id as value), than add another text field with generic text and link that uses value from select to form it's link to the form (in the link settings choose form, than after + chose fields and insert mentioned select field name as target). 
  3. use beforeRender code field to compute the right link using php code
83 Posts
squareweb
5 years ago
0
Level 1

Hi Klas,

Thanks again for taking time to understand my case. Good ideas, I've started with option 2 in combination with before-render field.

After completion I'll post a short compilation here and change forum status to solved.

Thanks again

83 Posts
squareweb
5 years ago
1
Level 1

Almost there, I can't seem to get the link working I tried with textfield and icon.

I "prepared" everything with before-render-php. Everything is sorted out.

The content-type field is a non-storage field set by before-render (I show this field in the list for testing purposes).

The icon field doesn't pick up the form-name .

Any ideas whats not ok?

Thanks again.

bigger image here: http://squareweb.nl/tmp/sebdyn.jpg

83 Posts
squareweb
5 years ago
0
Level 2

On my path to Seblod-mastery (:- I've solved this by using only the before-render-field to build the right URL (link). Still I do find it strange why my previous attempt with the link-field didn't work?

Also I question what is the return-URL-parameter about which Seblod adds to the URL, what is its function? I ask this because I do not add this URL-parameter (don't know if its really needed and how to create it).

See following URL (bold):

http://mfw-loc:8888/lijsten/moederformulieren/form/mform1?id=534&return=aHR0cDovL21mdy1sb2M6ODg4OC9saWpzdGVuL21vZWRlcmZvcm11bGllcmVu

I'll post my breakdown soon.

Get a VIP membership