Hello donquixote,

An issue I noticed is that if my form fails to validate (for example a required field was not filled out) the multicrud field gets completely reset (empty).

Is this a multicrud issue or this needs to be coded in my own module?

Cheers,
G

Comments

giorgio79’s picture

Ah

"This module does not define any submit handlers. You need to do that yourself. "

I guess I will have to code some magic then in nodeapi

    case 'validate':
      // OPTIONAL: The user has just finished editing the node and is
      // trying to preview or submit it. This hook can be used to check
      // the node data. Errors should be set with form_set_error().
      break;
giorgio79’s picture

Status: Active » Closed (won't fix)
donquixote’s picture

Status: Closed (won't fix) » Active

No submit handlers are called if validation fails.
Multicrud should do validation by itself, and keep the form values. If this does not work, it's a multicrud issue.

giorgio79’s picture

Seems like this is a common issue:

http://drupal.org/search/apachesolr_search/form%20data%20lost%20preview

Here is an issue queue with a comprehensible patch as well :)
http://drupal.org/node/444166

giorgio79’s picture

Here is an even better example

http://drupal.org/node/457630

restyler’s picture

Category: support » bug
Priority: Normal » Critical

I think these examples are not applicable as multicrud registers its own element, so empty values problem can be fixed on lower level - in element handlers.