Home › Forums › Front End PM PRO › Adding reception on input field with jquery
- This topic has 9 replies, 2 voices, and was last updated 6 years, 9 months ago by Shamim Hasan.
-
AuthorPosts
-
March 10, 2018 at 7:50 pm #12123Marko MusickiParticipant
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…
March 10, 2018 at 8:20 pm #12130Shamim HasanKeymasterMarch 10, 2018 at 8:50 pm #12133Marko MusickiParticipantSAVE OF THE DAY!
Fastest support on earth!
Thank you! 🙂March 10, 2018 at 10:03 pm #12136Marko MusickiParticipantOne 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*?
March 10, 2018 at 10:10 pm #12139Shamim HasanKeymasterYou can use
selector.tokenInput("remove", {id: x});
where x is user idMarch 10, 2018 at 10:10 pm #12142Marko MusickiParticipantOk, we found it: selector.tokenInput(“remove”, {id: x, name: y}); !!!
March 11, 2018 at 8:05 pm #12150Marko MusickiParticipantHi, 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?
March 11, 2018 at 10:17 pm #12153Shamim HasanKeymasterPRO 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.March 13, 2018 at 4:03 pm #12206Marko MusickiParticipantHi, 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?March 13, 2018 at 6:00 pm #12209Shamim HasanKeymasterto 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. -
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.