简体   繁体   English

在表单上填充文本框-oracle

[英]populating a text box on a form - oracle

I am using application builder in oracle - and I have a create new record form for the opening times of a cinema. 我在oracle中使用应用程序生成器-我为电影院的放映时间创建了一个新的记录表。

Basically at the moment I have it so you can put ina cinema id from a cinema table, but the problem is whith that you need to know the id - so its not very user friendly. 基本上,现在我可以使用它了,因此您可以从电影院表中放入一个电影院ID,但是问题是您需要知道该ID,所以它不是非常用户友好。 I would like this id to be dynamically be put in to the form somehow by slecting the cinema name from a dropdown (I have managed to include the cinema dropdown) 我希望通过从下拉列表中选择电影院名称以某种方式动态地将该ID放入表单中(我设法包含了电影院下拉菜单)

How can i populate the form with the respective id based upn the choice of the select box in application builder? 如何在应用程序构建器中选择框的选择基础上用各自的ID填充表单?

Thanks 谢谢

Do you mean Oracle Application Express, which has a component called application builder? 您是说Oracle Application Express,它具有一个称为应用程序构建器的组件?

A typical select list query would be: 典型的选择列表查询为:

select cinema_name, cinema_id
from cinemas
order by cinema_name;

That will display a list of cinema names to the user, and when the pick one populate the item value with the cinema ID. 这将向用户显示电影院名称的列表,并在用户选择时用电影院ID填充项目值。 In HTML terms it constructs a SELECT tag like this: 用HTML术语,它构造一个SELECT标记,如下所示:

<select id="P1_CINEMAS">
  <option value="11">Ashtead</option>
  <option value="23">Birmingham</option>
  <option value="72">Croydon</option>
</select>

If the user chooses "Croydon" from the above list, the value "72" will be posted to the database. 如果用户从上面的列表中选择“ Croydon”,则值“ 72”将发布到数据库中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM