需要用户的一个好办法,选取[为了QUOT&;电子邮件发送 [英] Need a good way for user to select "To" for email sending

查看:163
本文介绍了需要用户的一个好办法,选取[为了QUOT&;电子邮件发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,用户可以从发送电子邮件。我有样的模仿基本形式:

I have a website where a user can send out emails from. I have kind of mimics basic form with:

To: <Text Input>
Subject:<Text Input>
Attachments: <Button> <Text Input>
Body <input text>

我有一个数据库表中的电子邮件地址列表,很容易对我来说,检索此。我试图找到支持以下用例的灵巧方式:

I have a list of email address in a database table and it's easy for me to retrieve this. I am trying to find the slickest way to support the following use cases:


  1. 允许用户将电子邮件发送到大家都在列表中。

  2. 允许用户选择组的特定成员

什么是做到这一点的好办法?做一些code样品存在?

What would be a good way to do this? Do some code samples exist?

我想到了一个办法是模仿的Gmail时,你可以开始输入,它会做列表中的邮件内嵌的搜索。我想我将有一个单独的按钮,在这种情况下,以全选的用户。

One way I thought of is to mimic Gmail when you can just start typing and it will do an inline search for emails in the list. I guess I would have a separate button to "Select All" users in this case.

这只是一个想法。我很开放的建议。

That is just one idea. I am open to suggestions.

推荐答案

的jQuery插件我在回答中引用下面已经被换成了的的jQuery UI组件

The jQuery plugin I referenced in my answer below has been replaced by a jQuery UI component.

我肯定会推荐自动完成的方法。这样 jQuery插件的东西将是一个良好的开端。你需要修改code治疗逗号作为一个新的自动完成搜索虽然触发。

I'd definitely recommend the autocomplete approach. Something like this jQuery plugin would be a good start. You'd need to modify the code to treat commas as a trigger for a new autocomplete search though.

对于所有成员,是啊,所有成员复选框似乎是最直接的。如果你愿意,你也可以包括关键字触发了您要场处理,使诸如全部或所有人,就等于选择复选框。

As for the all members, yup, an "All Members" checkbox seems the most straightforward. If you wanted, you could also include keyword triggers in your To field processing so that words like "All" or "Everyone" would be equivalent to selecting the checkbox.

编辑: jQuery是在我前面和自动完成插件一步已经支持的多个条目的:

jQuery is one step ahead of me and the autocomplete plugin already supports multiple entries:

$("#suggest3").autocomplete(cities, {
    multiple: true,
    mustMatch: true,
    autoFill: true
});

这篇关于需要用户的一个好办法,选取[为了QUOT&;电子邮件发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆