Closed (fixed)
Project:
Subform Element
Version:
5.x-1.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2007 at 11:40 UTC
Updated:
2 Jun 2008 at 12:45 UTC
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
Comment #1
fagono, 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.
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
reed.richards commentedI 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.