Choose a recipient on click

Home Forums Front End PM PRO Choose a recipient on click

This topic is: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #8136

    I’ve used the free version of your plugin before and it was really simple to fill in recipient input using JS by setting up values to certain inputs on click. That was my code:

    $(document).on(‘click’,’.recipients-list span’, function(){
    $recipientname = $(this).html();
    $recipientnick = $(this).attr(‘data-nickname’);
    $(‘#fep-message-top’).val($recipientname );
    $(‘#fep-message-to’).val($recipientnick );

    Now, with the PRO version, I get “You must enter valid recipient!” error (screen: despite I prepend

    “<li class=”token-input-token-facebook”><p>’+$recipientname+'</p><span class=”token-input-delete-token-facebook”>×</span>” before .token-input-input-token-facebook as it’s done after I type it manually in the dropdown list – I guess the condition whether recipient is filled in or not triggers via ajax, could you help me with this? How can I improve my code now with the PRO version? That’s really important, I don’t want my users to type recipients manually.

    And btw I bought your plugin only because of the following bug – site url is missing in the email template when I get a new message – it starts with message page URL (check below) and as you don’t allow to edit email templates in the free version I was forced to buy your plugin to face to another problem.

    Please help me either to fix the following bug or trigger filling recipient input on click without typing it manually.

    Email template:

    “Website name”
    From: kestioadmin
    Subject: Subject
    Please Click the following link to view full Message.


    For message page url in email you can set “Front End PM Page” in Dashboard > Front End PM PRO > Settings > General.

    To auto fill your selected users, you can use ( users do not have to be admin, you can use normal users also in that list).

    If you want to pre-populate (without click), you can use , for multiple users you can pass their id’s separated by comma.

    You can even use (here you can easily change value by JS).

    If you want to select onclick (what you are showing in your screencast) you can use selector.tokenInput("add", {id: x, name: y}); where “id” is user id and “name” is user display name. If you want to select one recipient only, you can call selector.tokenInput("clear"); before adding.

    Let me know.


    Thanks for your help Shamim!
    For everyone who’s looking for the same answer – it’s also a must to add return false; – either way, you’ll get an error.

    $(document).on('click','.prepoludatedselector', function(){
       $('#fep_mr_to').tokenInput("add", {id: 1, name: "NAME"});
       return false;
    Faynah Faynah
    This reply has been marked as private.

    You can follow
    If you have any more question please create a new topic.

Viewing 5 posts - 1 through 5 (of 5 total)

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.