1

我们如何创建三个DropDownList来显示国家、州和城市。当我们选择一个国家时,它会自动在 next 中显示该国家的州名DropDownList。然后当我们选择一个州时,城市DropDownList将获取该州的相关城市。此处
创建一个下拉列表。

4

1 回答 1

0

The easiest solution might be to create your own custom controlled vocabulary and use the DSpace controlled vocabulary lookup mechanism.

If you don't wish to go the controlled vocabulary route, I see two options:

  1. Define the field as one of the standard input form types in input-forms.xml but inject JavaScript into the submission process that transforms it into your series of drop-down boxes. Other than injecting the JavaScript (how to do this differs between XMLUI vs JSPUI and also between XMLUI themes), this change would need no code customisations.
  2. Extend the set of input form types available to include one that meets your needs. This requires code customisations. You would probably also have to inject some JavaScript code that enables the dynamic behaviour you describe (narrow down state by country etc).
于 2015-04-28T21:08:29.373 回答