同一页面上的两种形式 [英] Two forms on the same page drupal

查看:101
本文介绍了同一页面上的两种形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户数据库.在输入新客户端之前,我想确保该客户端尚未在数据库中.因此,我想在页面顶部放置一个搜索表单,以按客户编号和客户名称进行搜索.在页面的更下方,我将有另一个表单来输入和提交客户的信息.这是做这样的事情的最好方法吗?您将如何处理?我正在使用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.

推荐答案

最好在用户插入新的客户名称时,自动完成功能显示与用户插入的字符匹配的名称.如果用户写了"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).

这篇关于同一页面上的两种形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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