同一页面上的两个表单 drupal
我有一个客户数据库。在输入新客户端之前,我想确保该客户端尚未存在于数据库中。因此,我想在页面顶部放置一个搜索表单,以便按客户编号和客户名称进行搜索。在页面的下方,我将有另一个表格来输入和提交客户信息。这是解决此类问题的最佳方式吗?你会如何处理这个问题?我正在使用 drupal 6。
I have a database of clients. Before entering a new client, I want to make sure that that client is not already in the database. So I want to put a search form at the top of my page to search by client number, and client name. Further down the page, I'll have another form to enter and submit the client's information. Would this be the best way to go about something like this? How would you approach this? i'm using drupal 6.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好是当用户插入新的客户名称时,自动完成功能会显示与用户插入的字符相匹配的名称;如果用户写了“Mic”,并且数据库中有一个名为“Michael Greenpeace”的客户,则自动完成将显示“Michael Greenpeace”,并且用户将了解该客户已经有一条记录。
即使没有自动完成(这将帮助用户了解客户的数据是否已插入数据库,并继续处理下一个客户),插入现有客户名称的用户也应该看到现有数据;这将帮助用户避免重写已经更新的数据(有时需要更新客户信息,而不仅仅是插入)。
It is better that when the user is inserting a new customer name, an autocomplete shows the names matching the characters inserted by the user; if the user wrote "Mic", and in the database there is a customer with the name "Michael Greenpeace", the autocomplete will show "Michael Greenpeace", and the user will understand there is already a record for that customer.
Even without the autocomplete (which would help the user to understand if the data for the customer has been already inserted in the database, and continue with the next customer), a user that inserted the name of an existing customer should see the existing data; this would help the user to avoid rewriting data that are already updated (customer information need to be updated, sometimes, and not only inserted).