Home › Forums › Front End PM PRO › New message form autopopulated specific to user
- This topic has 13 replies, 2 voices, and was last updated 7 years, 9 months ago by David.
-
AuthorPosts
-
January 9, 2018 at 11:25 pm #9728DavidParticipant
Hi, me again!
I want to generate a new message form via php which will be autopopulated with recipient and message title. However, I only want to make it show for a specific user. All other users will not see the form.
Appreciate any help you can offer.
Thanks very much!
January 10, 2018 at 4:17 am #9731DavidParticipantSorry, not a specific user but a specific user role “business”.
Thanks
January 10, 2018 at 12:55 pm #9742Shamim HasanKeymasterJanuary 10, 2018 at 4:48 pm #9745DavidParticipantHi, thanks for that.
I tried the fep_shortcode new_message_form in php but couldn’t display the form. So I tried all the shortcodes in a new page and got the following results:
[fep_shortcode_new_announcement_count] – not displaying
[fep_shortcode_new_message_count] – not displaying
[fep_shortcode new_message_form] – not displaying
[front-end-pm] – working ok
[fep_shortcode_message_to] – working okAm I missing something?
January 10, 2018 at 5:21 pm #9748DavidParticipantSorry for the mistype. I confirm I have tried [fep_shortcode_new_message_form] and it is not working. Also tried it on another site and no display.
January 11, 2018 at 2:29 pm #9766Shamim HasanKeymasterAs you not supplying any “to” argument with this shortcode, by default this will send message to page author where you added this shortcode.
Please not that if you are not logged in or same as “to” user, no form will show. So if you are that page author no form will show. Try create a test user account and log in with that account to see the form in action.January 12, 2018 at 12:21 am #9772DavidParticipantYes, sorry you are right, and now I have read the note at the bottom of that page. Sorry about that.
Anyway, I am trying to make it work using an input from another plugin. At the moment I am using the following link:
href=”https://mysite.com/offer/?fepaction=newmessage&to=$adcontact_name&message_title=Re: $title
where $adcontact_name gives the user nicename generated by the plugin.
Unfortunately if I use it in the shortcode as follows it doesn’t work;
echo do_shortcode(“[fep_shortcode_new_message_form to=$adcontact_name subject=Re: $title]”);
Any ideas or help would be appreciated.
January 12, 2018 at 3:10 pm #9785Shamim HasanKeymasterWhat it shows?Does it shows any error? Does form showed up?
January 12, 2018 at 3:16 pm #9788DavidParticipantIf I use the first link:
href=”https://mysite.com/offer/?fepaction=newmessage&to=$adcontact_name&message_title=Re: $title
everything works great.
But if I use the shortcode:
echo do_shortcode(“[fep_shortcode_new_message_form to=$adcontact_name subject=Re: $title]”);
the form does not show.
January 12, 2018 at 3:27 pm #9791Shamim HasanKeymasterAre you logged in when visit that page? are you logged in same as $adcontact_name?
January 12, 2018 at 3:39 pm #9794DavidParticipantNo, I’m logged in as Administrator. I want the form to be prepopulated with the name of the ad contact name. So it will change for every ad.
January 12, 2018 at 3:55 pm #9798Shamim HasanKeymasterCan you give me access to your website so that i can try?
January 12, 2018 at 4:31 pm #9801DavidParticipantI’ll keep trying and let you know. I think I may have figured it out.
January 13, 2018 at 7:16 pm #9809DavidParticipantNo still not working. $adcontact_name from the other plugin works ok in the link but does not work in the shortcode. I have asked the other plugin guys if they can offer any help.
I don’t really want to give access to the site at the moment. Thanks for the offer but I will see if I get anything from the other plugin first.
-
AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.