Due to lack of cck field support likely computed fields and entity reference I am moving towards enity forms.
On Previous projects I designed forms using webforms with limited fields. I thought one feature missing which is required.
On content type, fields like image can be added that will be shown while webform form entry along with body field of content type becomes form help descriptions.
But in entity form "Intro form instructions" is present that means images can't be added. Alternatively image upload option can also be given while "Entityform Types" creation, but visibility of fields can't be managed. On other hand if it is attached to content type then fields visibility can be configured in respected content type's manage display.
I am attaching snapshot of webform.
| Comment | File | Size | Author |
|---|---|---|---|
| Free Palmistry Services -upload.png | 57.77 KB | nithinkolekar |
Comments
Comment #1
tedbowYou can attach entityform nodes via Entity Reference
Example video: http://www.sixmiletech.com/content/embedding-entiyform-node#.UeGJhmRAToE
Or look at Meta issue for 2.x
https://drupal.org/node/1896712
Comment #2
nithinkolekar commentedok tedbow,
I will check that.
Comment #3
nithinkolekar commented@ted
Video tutorial helped me to convert some webform into entityform.Now I am trying to make as view which shows the submission grouped by the category.
what I have...
'Enity form' with basic fields like name,e-mail, issue is attached to content type "Support/Help".
Two node are created for content type namely Billing and Technical. Respectively menu is generated to submit the issue.
Node 1. Submit your query to Billing department.
Node 2. Submit your query to Technical department.
Now I don't know how to make a view and get submission content grouped by department. In database I don't find any tables which contains relations between entityforms that are submitted and content node (in this case NID 1 or NID 2).
Comment #4
tedbowTo make a relationship to the node you need Entityreference Current
Comment #5
nithinkolekar commentedhi ted,
I installed the module and investigating how that will full fill the requirement.I am just confused with info in the module's page
This allows an Entityreference field on the EntityForm
But in video demonstration Entityform itself is a entity reference attached to node, that is how I made the settings.
Isn't it possible to get the node id when submitting the form and save it in database table entityform just like UID.
Comment #6
nithinkolekar commentedI finally figured out to get the parent node id to which entity form is attached. Video tutorial mentioned at #2 only demonstrates linking of entityform and normal content type node.Here is a quick steps
1. create a enitityform say "Ticket" with required fields you need for submission(another required field will be added later)
2. create custom content type say "Support - Billing" with a additional entityreference field which will refer to "entity form type".If you installed Entityreference Current module you will see "Entity reference Current" check box under additional behaviors.Do not enable this option leave it unselected.
3. In manage display of content type select "rendered entity" for entityreference field created in previous step.
4.Add entityreference field to the entityform created in step 1. Under additional behaviors option enable "Entity reference Current" checkbox. Optionally for Fallback behavior option you can select "form error" so that you can see error when node id is not present in the url.
5. Create a node for content type created in step 2,attach the entityform(Ticket) to the entityreference field.
6. View the newly created node and you will see entity form is visible.Do not try to submit form through Submit link under entityform type page.This may rise form error(if Fallback behavior is enabled and set to form error) because node will not be available in the url/path.
Comment #7
1kenthomas commentedIt seems to me it would be useful to have automatic creation of nodes in a content type, which include each EF submission, in a variety of use cases... this does not seem straighforward AFAICT, (I can be wrong!).
Comment #8
nithinkolekar commented@1kenthomas
I think the concept here is node would optionally contains the information about entity form ie attached like
why this submission ?
when the submission end?
it may also have related image..(see first post attach) etc.
This information is common to all entity form and it will shown during submission. This information shouldn't be created or updated every time user submits the form.Only drawback or missing feature in Entityreference Current is , it should load parent node entity while node_load() addition to getting nid from node url.
Comment #8.0
nithinkolekar commentedminor changes
Comment #9
tedbowComment #10
hoangdk80 commentedYou should use the class EntityFieldQuery
Basically it let you fetch an entity based on the value of any or several of its fields.
For an entity referencing field, field condition would be:
>fieldCondition('your_entity_reference_field_name', 'target_id', $nid, '=');