Forums / Suggestions / Add new action parameters for Collectinformation: RedirectXXXX

Add new action parameters for Collectinformation: RedirectXXXX

Author Message

Plamen Petkov

Friday 23 April 2004 9:00:33 am

PLEASE, READ :-)

Currently, there is no way to tell the Ez to redirect to specific node/uri after collecting information (besides those specified in collect.ini, but they are design-time defined). The following form has an additional action parameter: RedirectToNodeID ($poll_node is fetched somewhere at the begining of the tpl):

<form method="post" action={"content/action"|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$poll_node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$poll_node.object.id}" />
<input type="hidden" name="RedirectToNodeID" value="<some-node-id>" />
{attribute_view_gui attribute=$poll_node.object.data_map.option}
{section name=ContentAction loop=$poll_node.object.content_action_list show=$poll_node.object.content_action_list}
<input type="submit" name="{$ContentAction:item.action}" value="Vote" />
{/section}
</form>

Such an action param should override DisplayList[] setting from collect.ini

Here are 2 scenarios when I realy *need* this functionality:

Scenario 1:
- full view of an article with a poll box
- user votes and must return to the same article (node) again

Scenario 2:
- user is reading some article placed in the content area of the site ($module_result)
- there is a poll outside the content area - he votes
- user must be returned to the same node, not to the result page of the vote

The same applies to RedirectURI

This functionality can be easily integrated into the current collectinformation action... Actualy, I already did it.. but am afraid will lose the path when new releases come through...

regards and sorry fo the long posting...

Stéphane Bullier

Thursday 19 April 2007 3:16:42 am

Hello,

I try to redirect a submission of a poll to a specific node. I didn't succed. Always I am redirected to the result page with this url : http://my_site/content/action

My template code for my poll is (embed view) :

<form method="post" action={"content/action"|ezurl} name="sondage_form" id="sondage_form">
	<input type="hidden" name="TopLevelNode" value="{$object.main_parent_node_id}" />
	<input type="hidden" name="ContentNodeID" value="{$object.main_node_id}" />
	<input type="hidden" name="ContentObjectID" value="{$object.id}" />
	<input type="hidden" name="RedirectToNodeID" value="62" />
	<p class="question">{$object.data_map.question.content.name}</p>
	{foreach $object.data_map.question.content.option_list as $option}
		<p class="radio">
			<input type="radio" name="ContentObjectAttribute_data_option_value_{$object.data_map.question.id}" value="{$option.id}" />
			<label>{$option.value}</label>
		</p>
	{/foreach}
	<p class="radio"><input class="submit" type="submit" name="ActionCollectInformation" value="Voter" /></p>
</form>

I modified the collect.ini :
[DisplaySettings]
Display=node
DisplayList[]
DisplayList[sondage_home]=node

Thank you.

Stéphane