Private Message Form Redirects to Specific Page
4 posters
Page 1 of 1
Private Message Form Redirects to Specific Page
So I'm using the private message form for other parts of my site so that messages are sent to me from the members. I created a success page that I want it to redirect to instead of the private message sent page, but it doesn't seem to work. I tired this which does redirect it but the message is never sent to me, so it basically messes up the form or something? Note, I may want to use this with different redirects based on what I'm using the form for so if there's a way to do this for the specific form instead of just all private messages that would be helpful. Especially since I'd still like when members send a private message they get the private message sent page, or are sent to the inbox or something.
Also this was the original part of the form which works but shows the private message sent page:
action="/privmsg"
- Code:
<form id="privatemessage" action="/h58-boutique-entry-sent" method="post" name="post" class="textarea">
<input name="username[]" type="text" style="display:none" value="Leandra"/>
<input name="subject" type="text" class="usernameinput" value="boutique of the month" style="display:none"/>
<input type="text" id="cartMessage" class="noThis" name="message" >
<input type="submit" class="sendingBut" name="post" value="Submit" />
</form>
Also this was the original part of the form which works but shows the private message sent page:
action="/privmsg"
Re: Private Message Form Redirects to Specific Page
I still do not understand what exactly you want. Could you explain it step by step?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Private Message Form Redirects to Specific Page
this is for post i think but it could help you figure out your code
https://help.forumotion.com/t134669p30-reply-to-topic-redirect?highlight=post+redirect
https://help.forumotion.com/t134669p30-reply-to-topic-redirect?highlight=post+redirect
Re: Private Message Form Redirects to Specific Page
@SLGrey I basically want to make this specific form redirect to a specific page that i choose instead of the private message sent page.
Re: Private Message Form Redirects to Specific Page
Hello DesignersSociety,
Try this :
Administration Panel > Modules > HTML Pages management
Add this to an HTML page :
If you chose "Use your forum header and footer", remove this portion from the code above :
Next go to JavaScripts code management and create a new script :
Title : Your choice
Placement : In all the pages
Paste the code below and save :
After sending a PM with the form I provided, you should be redirected to html page 58. Take note that this method wont work on outdated browsers.
Try this :
Administration Panel > Modules > HTML Pages management
Add this to an HTML page :
- Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<form id="privatemessage" action="/privmsg" method="post" name="post" class="textarea" onsubmit="sendData();">
<input name="username[]" type="text" style="display:none" value="Leandra"/>
<input name="subject" type="text" class="usernameinput" value="boutique of the month" style="display:none"/>
<input type="text" id="cartMessage" class="noThis" name="message" />
<input type="submit" class="sendingBut" name="post" value="Submit" />
<span id="authData"></span>
<script type="text/javascript">jQuery('#authData').load('/privmsg?mode=post input[name="auth[]"]')</script>
</form>
<script type="text/javascript">function sendData() { localStorage.postPM = true }</script>
If you chose "Use your forum header and footer", remove this portion from the code above :
- Code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
Next go to JavaScripts code management and create a new script :
Title : Your choice
Placement : In all the pages
Paste the code below and save :
- Code:
if (localStorage.postPM) {
location.pathname = '/h58-';
localStorage.removeItem('postPM');
}
After sending a PM with the form I provided, you should be redirected to html page 58. Take note that this method wont work on outdated browsers.
Re: Private Message Form Redirects to Specific Page
Thank you so so much that worked! Also any chance you know how to make profile fields work in an iframe? When I try to put this on an html page and then use an iframe for that page on another page, it won't show? I know its more than I originally asked but that'd really help.
This is on say html page 50:
And then this on html page 51:
This is on say html page 50:
- Code:
Your Profile:<span id="profileedit" align="center"></span></center>
<script>$('#profileedit').load('/profile?mode=editprofile .three-col')
</script>
And then this on html page 51:
- Code:
<iframe style="width: 560px; height: 210px;border:0px!important;" src="http://www.designerssociety.net/h50-profile" scrolling="no"></iframe>
Re: Private Message Form Redirects to Specific Page
Replace your iframe by :
You have scrolling="no" on the frame which doesn't allow you to scroll. I made a test and it loaded the profile in the frame.
- Code:
<iframe style="width: 560px; height: 210px;border:0px!important;" src="http://www.designerssociety.net/h50-profile"></iframe>
You have scrolling="no" on the frame which doesn't allow you to scroll. I made a test and it loaded the profile in the frame.
Re: Private Message Form Redirects to Specific Page
Thank you I actually had scripts set allowed in a past version which didn't work, after removing that it worked. One last question... is there a way to do the redirecting to any link, but with editing and clicking save on your profile?
Re: Private Message Form Redirects to Specific Page
See if this works :DesignersSociety wrote:Thank you I actually had scripts set allowed in a past version which didn't work, after removing that it worked. One last question... is there a way to do the redirecting to any link, but with editing and clicking save on your profile?
Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In all the pages
Paste the code below :
- Code:
$(function(){$('form#register[action="/profile"]').submit(function() { localStorage.postPr = true })});
if (localStorage.postPr) {
location.pathname = '/h1-';
localStorage.removeItem('postPr');
}
Re: Private Message Form Redirects to Specific Page
Is this for the default profile settings ? ex : /profile?mode=editprofile
Re: Private Message Form Redirects to Specific Page
I'm actually adding it to a different page like so... <center><span id="profileedit" align="center"></span></center>
<script>$('#profileedit').load('/profile?mode=editprofile .three-col')
</script>
<script>$('#profileedit').load('/profile?mode=editprofile .three-col')
</script>
Re: Private Message Form Redirects to Specific Page
You might need to bind the event. So, try replacing the script by this :
- Code:
$(function(){$('form#register[action="/profile"]').on('submit',function() { localStorage.postPr = true })});
if (localStorage.postPr) {
location.pathname = '/h1-';
localStorage.removeItem('postPr');
}
Similar topics
» Show first message on each page for specific topics
» Cannot send private message from Profile Page.
» Email form for message delivery.
» Logo not redirects to main page
» quick response form in private messages - I suggest
» Cannot send private message from Profile Page.
» Email form for message delivery.
» Logo not redirects to main page
» quick response form in private messages - I suggest
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum