多重选择输入的优雅解决方案?
这里的多部分问题一直困扰着我多年。我有点业余,仅供参考,您可以在这里看到实时网站:
http://artsparkcc.com/enroll。 正如您所看到的,
该网站是一个注册表单,供家长让孩子参加艺术课程。它运作良好,但很多家长一直抱怨他们想同时报名多个课程。目前,该表单使用 CGI 电子邮件脚本通过文本文件模板将表单变量直接通过电子邮件发送给管理员。
我很难想出一个轻量级的解决方案。我已经检查了一些 jquery 多选插件,但它们都不能很好地配合我的 CGI 电子邮件设置,而且我目前没有时间仅为多选重写整个页面。
家长需要能够注册尽可能多或尽可能少的课程,并且输入结果需要能够干净地发送给管理员进行记录。我想过让它们成为一个巨大的复选框雷区,但它看起来很难看,我想保留选择。
有什么想法吗?先感谢您。
Multi-part problem here that's been bugging me for ages. I'm somewhat of an amateur FYI and you can see the live site here:
http://artsparkcc.com/enroll.html
As you can see the site is an enrollment form for parents entering their kids in art classes. It works fine but a lot of parents have been complaining that they would like to enroll in multiple classes at once. Currently the form uses the CGI email script to email the form vars directly to the admins through a text file template.
I'm having a hard time coming up with a lightweight solution. I've checked for some jquery multiple-select plugins but none of them work nice with my CGI email setup and I currently don't have the time to rewrite the whole page just for multiple selects.
Parents need to be able to enroll in as many or as few classes as possible, and the input result needs to be able to cleanly be sent to the admins for recording. I thought about just making them all a big minefield of checkboxes but it looks ugly as sin and I'd like to keep the selects.
Any ideas? Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否检查过 jQuery 插件bsmSelect?
无论如何,“多选”插件与您的 CGI 电子邮件设置不兼容是怎么回事?
Have you checked out the jQuery plugin bsmSelect?
Anyway, what is it about the "multiple-select" plugins that doesn't work nice with your CGI email setup?
如果您只是将属性
multiple="multiple"
添加到 select 标签,您将能够选择多个类。您的 CGI 脚本将收到多个名称为 Classchosen 的值,您只需确保解析所有这些值即可。If you just add to the select tag the attribute
multiple="multiple"
you'll be able to select multiple classes. Your CGI script will recieve multiple values with the name Classchosen, you just have to make sure to parse them all.将表单的注册部分更改为两个多选字段,将值从一个字段传输到另一个字段怎么样?
您可以在此处查看我的意思的示例< /a>.
我认为这将使界面更易于使用(或者也许只是我)。
What about changing the enrollment part of your form into two multi-select fields that transfer values from one to the other?
You can see a sample of what I mean here.
I think it'll make the interface easier to use (or maybe that's just me).