I've got a content type Hotel (Name, Description, Images with image_fupload), with a nodereference to Room (Name, Description).

I fill in ALL the fields, including the Room details and click submit, the images finish uploading but an error shows up on the page saying "field is required". Clicking next saves the Hotel node but there is no Room attached.

Have tried both Beta and Dev releases.

What gives?

Comments

rmacd’s picture

Same problem here, I'm trying to work out why the 'skip' option seems to have no effect - to no avail

EDIT: I've now realised that if a CCK field type is 'required' in the inline form, there's no way for it to be skipped.

The solution is to untick 'required' on referenced node types.

However, as title is also required, my un-drupal'ish' hack is to change the node's title to not be required on the DB, which can be found in 'has_title' on 'node_type'

rv0’s picture

I also had an issue with a required title field..

Problem is I needed the title + a date field + checkbox, nothing more...

The quickest hack I could think of is this, in node_widget.class.inc, in de is_empty() function line 208, I added:

  	if(empty($form_state['values']['title'])) return TRUE;

put this on top of the function and the problem should be gone.

This is not the best solution for every usecase, but it is in mine.
This is an issue that should probably be fixed in a more elegant way.

hillaryneaf’s picture

When I click the "Remove this item" button on the referenced node, I get "Title is required" error. Is this the same issue?

If I'm removing the referenced node, then why would it require a title field and throw that validation error?