Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Code - misc
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jun 2011 at 12:33 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fagoSomehow the vocabulary callback got lost, new patch attached.
Comment #2
fagoand one for drush make users
Comment #3
fagothis is a patch for profile2 to support entity_form().
Comment #4
scroogie commentedVery interesting, subscribing.
Comment #5
fagoCommitted.
Comment #7
amitaibu$form_state is undefined. Should it be an empty array?
I'm looking at it for Message - I'd like to provide a UI for users to CRUD message (i.e. message instance not message type).
Comment #8
sunOink.
First arguments should obviously be $form, $form_state...
:(
$form_state is never empty in D7. Should at least be form_state_defaults(), prepared and provided by the function invoking the hook.
Comment #9
fagoentity_form() is supposed to build and process the form for you - there is no possibility to embed forms in others or similar. That way there is no point or possibility to customize $form and $form_state.
This would be certainly nice, but I fear that would basically require a subform element for d7...
Right. Fix attached, please review.
Comment #11
fmizzell commentedsub
Comment #12
tim.plunkettThis prevents entity_form from being used in ctools modals. That needs a custom form_state.
A possible workaround for that is entity_metadata_form_id_* to complement entity_metadata_form_*.
Unsure about the &$form part, but this would really help with the ctools modal stuff.
Comment #13
fagoI've committed the fix from #9.
ad #12 : I see. Well we could add an optional parameter $form_state to entity_form() what allows prepopulating it that way. Anyway, let's please use a separate issue for improving this.
Comment #14
tim.plunkettOpened #1437902: Allow custom $form_state to be used with entity_form()