Adding reception on input field with jquery


Home Forums Front End PM PRO Adding reception on input field with jquery

This topic is: Resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #12123
    Marko Musicki
    Participant

    Hello,
    I just bought your pro plugin with license code: Front End PM PRO – Single Site: [MODERATOR: license key removed. Do not disclose your license key publicly.]

    We previously worked on free version, and we made that logged user can see other users that belongs to his structure (it is MLM shemes) on list beside your new message box, with checkbox beside each name in that list. And when he click on checkbox beside listed user, username of that checked user was added to #fep-message-top, and it worked flawlessly with single recipient. And we go for pro version because we need to have option to send to multiple users at once.
    But in pro version is whole different logic! Now your input field for To* not accept username, instead show display name of user, and we manage to rebuild our jquery to append same structure in input field To* with this code:
    $(‘input[name=selectMessage]’).on(‘change’, function() {
    $(“li.token-input-input-token-facebook”).before(“<li class=’token-input-token-facebook’><p>” +
    $(‘input[name=selectMessage]:checked’).map(function() { return this.value; }).get() +
    “</p><span class=’token-input-delete-token-facebook’>×</span>“);
    .
    .
    .
    and it work, and showing correctly in input field To*, and it adds nice multiple users to that fields, BUT we can not use x (close button beside each display name), if we click on it, nothing happens. ALSO we can not send message to that one or multiple users, we got error message: “You must enter valid recipient!”. I think we missing something. Notice: when we use just your deafult search and select some user/s it is able to remove that user or to send message to him/them.

    Can you please help us? We probably need to add somewhere user name, but we can not find where…

    #12130
    Shamim Hasan
    Keymaster
    #12133
    Marko Musicki
    Participant

    SAVE OF THE DAY!
    Fastest support on earth!
    Thank you! 🙂

    #12136
    Marko Musicki
    Participant

    One more question:
    Can we pass parameter/s to selector.tokenInput(“clear”); like for selector.tokenInput(“add”, {id: x, name: y});

    so we can delete just one reception by his id or name from the input field To*?

    #12139
    Shamim Hasan
    Keymaster

    You can use selector.tokenInput("remove", {id: x}); where x is user id

    #12142
    Marko Musicki
    Participant

    Ok, we found it: selector.tokenInput(“remove”, {id: x, name: y}); !!!

    #12150
    Marko Musicki
    Participant

    Hi, in basic version, there was option in admin back to uncheck autocomplete from To* input, now in pro vesrion we can’t find that options. For us it is critical to disable autocomplete, is there solution?

    #12153
    Shamim Hasan
    Keymaster

    PRO version “to” field simply will not work if auto-suggestion is disabled (if you use jQuery to fill up users then will work). So disabled auto-suggestion option is removed in PRO version. A work-around, you can use fep_autosuggestion_arguments filter hook to change arguments such a way that it finds no users.

    #12206
    Marko Musicki
    Participant

    Hi, is there way just to hide autosuggestion field? It is hidden by default, but, when you click on to* input field it will display. So can we set it somehow to not show, somewhere in jquery, or css?
    Also can you tell use where is stored parameters from setting tab, for example that user unchecked option to get email: “Email me when i got new message”? And can we set this option by default uncheked for all users?

    #12209
    Shamim Hasan
    Keymaster

    to hide autosuggestion field, you can find relevant class. May be .token-input-input-token-facebook {display: none;}

    You can use fep_get_user_option filter hook to change default value of user settings.

Viewing 10 posts - 1 through 10 (of 10 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.