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

Comments

fago’s picture

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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

reed.richards’s picture

I was looking to do something similar i.e. redirect the user to a new page and depending on the input show some info depending on the node and especially the node nid of the submitted node.

My direct intuition was as I know who the user is and I know which node type being submitted, I can just make a call to the database and get latest node submitted from that user. In the case of a anonymous user submitting a node I couldn't figure out a good approach but I am guessing you could just add a hidden field or something to look for in the node.