Need a good way for user to select “To” for email sending

前端 未结 3 1797
轮回少年
轮回少年 2021-01-14 08:03

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

To: 
Subject:
Attachments:         


        
3条回答
  •  清酒与你
    2021-01-14 08:52

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


    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.

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

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

提交回复
热议问题