Developer forum

Forum » CMS - Standard features » RenderItemCreationFrom always renders with same form name

RenderItemCreationFrom always renders with same form name

Claus Kølbæk
Claus Kølbæk
Reply

Hey

Trying to use 2x RenderItemCreationForm's on the same page result in a small problem regarding both ending up with the form name "ItemCreator_EditForm_0", and this ending up both posting whenever an item is created.

Also while we are at it, the template tags for ItemCreator could use the same option to only retrieve the spam fields as with the Form for editors.

Happy Holidays

Claus


Replies

 
Claus Kølbæk
Claus Kølbæk
Reply

Also - while at the topic of the itemcreator, it seems that it does not handle the user field type very well, the standard creator template renders no form control for the field - and even if u supply a field an user Id it does not seem to accept it (very limited testing on last part here).

 
Claus Kølbæk
Claus Kølbæk
Reply

Yet another thing with the ItemCreator - it does not seem to keen on accepting a folder as source page - if u simply input the folders ID as the source page, it works, but the field shows as being empty.

 
Nicolai Pedersen
Reply

Hi Claus

Thank you for the observations and input. It should be possible to have to item creators on the same page - if you have 2 open form tags and 2 close tags, only one of them will be submitted - it is not possible to submit 2 forms in one post, so it does sound like an error in the form markup.

With regards to the user selector, it will not render anything in the frontend, since it is a backend feature getting access to users and groups and the control related to that - rendering that in the frontend is considered a security issue. So the 'idea' is that you would have to find and list the users you need in the frontend using the API.

BR Nicolai

 
Claus Kølbæk
Claus Kølbæk
Reply

Hi Nicolai

About the forms the problem is as you say ofc. not a double post but instead that the single post triggers both item creators to create with the same data - which then means that one of them will be submitting invalid data.

In regards to the user selector I guess I can follow the security issue here, but I ofc. already check if a user is logged in with the right credentials, and also only allow for editing of a user in a selected folder, so I would atleast be ok with that being left up to the me to secure it :) - anyways - even if listing users and such is a security issue, it should still be possible to for it to atleast accept a comma seperated list of users, so it is possible to create the item with the users I then manually have to list out, right? - just so we are on the same page here, it is an item that takes a list of users, so when using the item creator I atm. have no option to add users to said list.

 

You must be logged in to post in the forum