143 Posts
Stef
10 years ago
10
Topic

Hi Seblod team,

I have  a list type with courses :

Name | Date | Price | Button "Suscribe"

I have a form to suscribe :

First name | Last Name | Contact | Course | Button "Send"

So when user read the list of course, he can suscribe to one of them.

The "Course" field of the form is a "Related Article" field (so later I can manage all this stuff) - Related with the list of courses.

How can i have this field prefilled when the user click on the suscribe button in the list of courses ?

For the moment, this button "Suscribe" is a text field - On "2" choose "Form" where i selected the form link...

By advance, excuse my poor english, i'm french speaking, but prefer to have a solution in english for others :-)

Thanks for your "super" tool :-)

Get a Book for SEBLOD
4229 Posts
Kadministrator
10 years ago
0
Level 1

Hi,

how do you pass course id from the button to the subscribe form? If it is an url parameter you can use it as live value in related article field.

143 Posts
Stef
10 years ago
0
Level 1

Hi Klas, and thanks for your answer...

I think this my question. I have never done this before, so i don't even know how to pass the course ID to the form. 

I have looked for a solution here, on Google or Youtube, but didn't find anything enough accurate for my level, sorry for that.

I'm just open to any suggestion :-)

143 Posts
Stef
10 years ago
4
Level 1

Sorry to bump this topic. Anybody to help me for the "How to" ? I just want the select feild to be pre-selected with the page i'm coming from... Thanks for any tutorial or help here :-)

4229 Posts
Kadministrator
10 years ago
3
Level 2

Hi,

you can add something like this to the form link 

course_id=$cck->getValue('art_id')

You also need to add Article id (art_id) field to the list fields, then set Typography to Clear and also its Label to Clear, so that it won't be visible in the list.

Then in subscribe form set related article live value to Url -> Variable and set course_id as variable (clicking on + on the right to the live field)

4229 Posts
Kadministrator
10 years ago
0
Level 3

Just a small note - you need to put above code in the Custom variables field, in additional link configuration that opens after you click on +

143 Posts
Stef
10 years ago
1
Level 3

Amazing ! That's work ! :-)

I was wondering a little about what "course_id" could be, but i found it easily... Thanks a lot Klas.

143 Posts
Stef
10 years ago
0
Level 4

BTW, should I put this topic on public forum back ?

4229 Posts
Kadministrator
10 years ago
0
Level 1

Probably a good idea, I also made a tutorial based on this

10 years ago
1
Level 1

Hi Stef,

Just about this step :

you can add something like this to the form link

course_id=$cck->getValue('art_id')

 I do not understand where to add this code exactly. Could be kind of you to give me any details.

Thanks,

Dom.

143 Posts
Stef
10 years ago
0
Level 2

Hi Dom-78,

Find your Search & List type. Edit.

In "Item" tab, find the field you want to link. Go on "2" and choose "Form".

Click on "+" on the side

In the window, CHoose your form on "Content type (form)"

In "Custom Variables" put the code. Know that "course_id" is depending of you initial form. For mine i.e. is called "formation" and not "course_id".

Hope you find it :-)

Get a Book for SEBLOD