47 Posts
sebg
8 years ago
10
Topic

Hello,

I bought the plugin Seblod form and list pack. I want to display a form in a content, but I don't understand how to....

Is there a tutorial somewhere ?

Thanks,

Seb

Get a VIP membership
1283 Posts
Bucklash
8 years ago
0
Level 1

Hi

Ahhh My apologies. I don't know what I didn't do, but at first I couldn't see an 'article' form inside an 'article' content view, but after playing, I can.

I think you need to place the form in a module, then place the module in your content view.

I think Lists work a bit differently and can be placed in directly with the List field.

My Form field had minimal config options

Create a Seblod Form module.

Publish it!

Assign it a position i.e. my-article-form

In your content view, add the Module field.

Enter your module's position i.e. 'my-article-form'

Save and Close.

Should be enough to do it

PS Maybe this still applies

using-a-form-in-seblod-content

4229 Posts
Kadministrator
8 years ago
0
Level 1

The Form & List Pack allows you to include a form or a list within your Content, Item or List View without needing a module. The advantage of this is that you can pass values from your parent list items to your embedded list.

To create a form in the content just add Seblod->form field to content tab of you content type and in the fields configuration add name of form you wish to include in the "Default Value" box (this is actually a bug in the label, should be Form Name). If you would like to pass some live values to the form you can do this using Fields as described in the following tutorial (which is for lists in lists, but principle is the same)

https://www.seblod.com/resources/tutorials/create-a-dynamic-list-within-a-list-item

47 Posts
sebg
8 years ago
4
Level 1

Thank you, my form is displayed in my content.

My problem is this:
I show this form on an event page (content) so that people can to register.
How to send in this form the title of the event (content)?

4229 Posts
Kadministrator
8 years ago
3
Level 2

Hi,

you don't send form to content, you need to create relationship between the parent content type (event) and child content type (registration). In your form add  "parent article id" field. Using fields option (see tutorial) you then need to pass parent article id to the mentioned "parent article id" field in the child form.

Then you will need a search type, that will show all regstrations - here you  use "parent article id" field to search only registrations linked to particular event. When you have this search type ready you insert this search into the parent content using list field. Again you need to pass event's article id to the child as "parent article id". This way you will see only registrations lined to this event. You will also probably need to add some restricitons on the form field and lsit field, so that form is shown only to e..g. registered group and list of registrations to e.g. admins.

47 Posts
sebg
8 years ago
2
Level 3

Hi,

Thanks for answer.
I don't find "parent article id" but "CCK parent id" field type. But I don't find tutorial about this.

How can I pass parent cck to the form ?

Thanks by advance.

4229 Posts
Kadministrator
8 years ago
1
Level 4

Hi,

you can't find this field in fields that were already made, you need to add new text field with such name (or any name, it is just important to use the same field in form and in search). You need to pass article id value to the form - for this you need to have article_id field in the content (in hidden position), then you can use Fields as described in tutoril to pass this value to your newly made field in the form.

47 Posts
sebg
8 years ago
0
Level 5

Hello,

I'm sorry but I still can not create the relationship between content and form.

You need to pass article id value to the form - for this you need to have article_id field in the content (in hidden position), then you can use Fields as described in tutoril to pass this value to your newly made field in the form.

But in the tutorial, and in the case of a list a field to the variable passage, but not in the case of a form where I have options (which I don't understand).


Could you help me ?
Thanks

4229 Posts
Kadministrator
8 years ago
2
Level 1

First I need to apologize, I missed you are talking about the form. In the form you will need to use live value options to get values from parent article.It is fortunately easy to get article id as it is in the url so you can use Url-Variable live value and se it to id and it will pick id from parent article, for the rest of fields you could use sd live plugin (which need some modification in code as it is not compatible with seblod 3.9)

157 Posts
Hableur
6 years ago
1
Level 2

Hello,

so it seems it is no way to pass article id when the form is displayed in a liste view...

4229 Posts
Kadministrator
6 years ago
0
Level 3

If you are a subscriber you can try asking Seblod for a new version of form plugin that supports passing values from parent that I made in January.

Get a VIP membership