Placement.info on Custom Forms

Topics: Writing modules, Writing themes
Nov 24, 2013 at 1:07 AM
Dear All,
I would like to know whether the placement.info file is applicable to hide content parts/fields on custom forms created on custom content types. My requirement is to hide fields and parts, but only during filling the form. After the content item is published, I need ti display these for anonymus users.

I tried to do it with placement.info, but no success with the followinng trials on the standard body part

A.) Added to theme root directory and Modules->Custom Forms->placement.info
<Match ContentType="Company">
<Place Body_Editor="-" />
</Match>

B.) Added to theme root directory
<Match ContentType="Company">
<Place Parts_Common_Body_Edit="-" />
</Match>

Content Type ID is Company.

Shape Tracing showed me Body_Editor under the following node hierarchy :​
Zone [Content]
-Parts_Title
-Content_Edit
--EditorTemplate
--EditorTemplate
--EditorTemplate
--EditorTemplate
--EditorTemplate
​--EditorTemplate
---Body_Editor
--EditorTemplate
--EditorTemplate
...
--Parts_Common_Owner_Edit

I'm not sure whether I'am wrong with my syntax, or the shape does not provide the placement feauture for the form editor fields.

Thank you in Advance
Attila
Nov 3, 2014 at 8:50 PM
Hi, I'm having this same problem, I want to add Bootstrap form tags around my form fields and also control the order of the order but i cant get placement.info to work with fields. Is it possible?
Developer
Nov 4, 2014 at 5:20 AM
You can use the admin placement feature to control placement of editor shapes (go to your content type definition, you'll see a "Placement" button on the upper right).
Nov 4, 2014 at 12:47 PM
Thanks skywalker, that sorted it.
I tried it previous but my iis config was wrong which caused it not to work, silly mistake.
Also your documentation (http://skywalkersoftwaredevelopment.net/) using orchard has been very helpful to me.