Hello.
I developed a page with NMS subscribe form, but form itself is placed in small area surrounded by graphic elements.
I need to redirect all NMS messages to page other than the form is put on.
There is hidden field "returnid" with value of page with NMS form, is there a way to set its value to other page? Or to set NMS form action to given page?
Greetings
Aleksander
[solved]NMS set returnid
- aleksanderlech
- Forum Members

- Posts: 113
- Joined: Thu Jan 29, 2009 1:37 pm
[solved]NMS set returnid
Last edited by aleksanderlech on Mon Sep 19, 2011 12:57 pm, edited 1 time in total.
Re: NMS set returnid
Try using replace
i.e. {$formhidden|replace:'returnid" value="15"':'returnid" value="18"'}
i.e. {$formhidden|replace:'returnid" value="15"':'returnid" value="18"'}
- aleksanderlech
- Forum Members

- Posts: 113
- Joined: Thu Jan 29, 2009 1:37 pm
Re: NMS set returnid
@applejack
thank you for your information, however this:
Doesn't work.
Greetz
thank you for your information, however this:
Code: Select all
{$formstart}
{if $message ne ""}
<span class="nms_message">{$message}</span>
{/if}
{$formhidden|replace:'returnid" value="15"':'returnid" value="68"'}
{$formhidden}Greetz
Re: NMS set returnid
Is your actual returnid 15 ?
- aleksanderlech
- Forum Members

- Posts: 113
- Joined: Thu Jan 29, 2009 1:37 pm
Re: NMS set returnid
yep.
This is how it looks:
Aleksander
This is how it looks:
Code: Select all
<form id="md4e46moduleform_1" method="post" action="_ill better keep it secret now_" class="cms_form">
<div class="hidden">
<input type="hidden" name="mact" value="NMS,md4e46,do_create_new_user,1" />
<input type="hidden" name="md4e46returnid" value="15" />
<input type="hidden" name="page" value="15" />
</div>
<input type="hidden" name="md4e46lists[]" value="1" />
<input type="hidden" name="md4e46lists[]" value="1" />
<label>twoje imię</label><input type="text" class="cms_textfield" name="md4e46username" id="md4e46username" value="" size="30" maxlength="150" />
<br />
<label>adres e-mail</label><input type="text" class="cms_textfield" name="md4e46email" id="md4e46email" value="" size="30" maxlength="150" />
<br />
<input class="cms_submit" name="md4e46submit" id="md4e46submit" value="Zatwierdź" type="submit" />
</form>Re: NMS set returnid
Sorry do the replace on the {$formstart}
If you just replace the returnid it will go to the correct page but will not show that URL in the address bar. If you need to show the URL in the address bar then you also need to replace the end part of the action. These will only work if the sign up form is on one specific page. If it is on multiple page then you will have to use regex_replace which is what I use to set the email confirmation return page to a specific page i.e.
{$confirmurl|regex_replace:"/\/NMS\/\d+\//":"/NMS/73/"}
If you just replace the returnid it will go to the correct page but will not show that URL in the address bar. If you need to show the URL in the address bar then you also need to replace the end part of the action. These will only work if the sign up form is on one specific page. If it is on multiple page then you will have to use regex_replace which is what I use to set the email confirmation return page to a specific page i.e.
{$confirmurl|regex_replace:"/\/NMS\/\d+\//":"/NMS/73/"}
- aleksanderlech
- Forum Members

- Posts: 113
- Joined: Thu Jan 29, 2009 1:37 pm
Re: NMS set returnid
Thank you - that worked 
Form is on one page only so there's no need to regex enything.
Best regards
Aleksander
Form is on one page only so there's no need to regex enything.
Best regards
Aleksander
