Implement Inline entity form hook hook_inline_entity_form_entity_form_alter to alter the node form.

Comments

StatusFileSize
new1.3 KB
new1.66 KB

This doesn't look right.

Seems to me that this module should implement hook_inline_entity_form_entity_form_alter() besides the usual alter, so that IEF is covered as well.

StatusFileSize
new1.05 KB
new1.4 KB

Ok, here is a new attempt :).

+ $entity_form['title']['#value'] = 'ant';

Huh?

http://drupalcode.org/project/auto_nodetitle.git/blame/HEAD:/auto_nodeti...

It's in right now, but I haven't analyze the code enough so do not know why either.

After a black-box test on the patch at #3 it seems to work fine.

#3 works for me as well, thanks.

Status:Needs review» Reviewed & tested by the community

Node title is required on submission, so I'm assuming that this is just assigning an arbitrary string to #value so that it can be generated later.

Also, this seems to have tested well, so any chance of getting it committed?

+1 that #3 is RTBC.

Tested and it solves the problem.

Reviewed the code and found no objections. I thought it was a shame that it sort of duplicates so much of auto_nodetitle_form_node_form_alter() but they're both small functions and enough details are different that trying to merge them is going to make the code worse.

Inline Entity Form is becoming the defacto standard for solving the problem of creating new entities for an entity_reference field in D7. I think it's worth it for auto_nodetitle to add this extra code to properly support that module.

Thanks!
-Derek

I tested the patch #1719948-3: Integration with inline entity form and works perfectly, please apply in next release

Confirming patch #1719948-3 applies cleanly to both 7.x-1.x-dev and 7.x-1.0. Thanks all for working on this.

Issue summary:View changes

Change hook to implement.

Issue summary:View changes
StatusFileSize
new1.63 KB

I altered patch in #3 to ensure this patch is also working when the title module is active (which replaces the title field).

Changes attached

StatusFileSize
new1.71 KB

Ignore #12, uploaded new file which fixes the title module too in inline entity forms.

I can not apply patch 1719948-13.patch
"The chunk size did not match the number of added/removed lines"

I change
@@ -39,6 +39,25 @@ function with
@@ -39,6 +39,34 @@ function

StatusFileSize
new1.71 KB

#13 patch is malformed.
I've fixed it as it was described in #14 (https://drupal.org/comment/8187367#comment-8187367).

Updated file was attached.