User login

Subform Element does not allow passing of nid information to subsequent forms

Guess we're back to:

http://api.drupal.org/api/function/drupal_execute/5
and
http://www.civicactions.com/blog/cck_import_and_update

Because subform element is not the way...

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/subform_element/API.txt?pathrev=DRUPAL-5&revision=1...

No, subform element has no solution for us:

Any recommended ways to get the nid of a node you just submitted in a subform to pass into the next subform?

The use case (WSF2008) is two forms merged into one, which are related in such a way (nodereference, a node belonging to an organic group) that the second form needs a value that exists only after the first form is processed.

So the question involves
1) setting the order subforms are submitted
2) obtaining information post-submit for the first one
3) passing that information into the array representing the second one before it is submitted

Updates
#1 submitted by fago on October 23, 2007 - 07:50 updated
Status: active » fixed
no, getting the nid isn't supported by normal forms either. try using nodeapi op insert/update to get the nid.

@order: the forms should be processed in the order they appear in the form tree
2,3) it doesn't provide anything for that, but it should be possible to achieve it - however it might get unclean and complicated.

UPDATE: In fact, the author of the addnode module does use subform element to get the nid of the node submitted by the subform.

Follow along with the make a node while making a node madness over here.

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.