开发者

Drupal: Hide and Show cck fields in nodes

It is possiblle to hide cck fields and show other cck field when you choose a combobox opcion in a node?

For example: combobox opcions: 1 f开发者_如何学Cield, 2 fields

If I select 1 field, my form has a text field If I select 2 fields, my form has a text area and a imagefield


You can always use the Conditional Fields module. After installing the module, you can use it as such:

  1. In your content type, add a select box and in allowed values area add "1 field" and "2 fields"
  2. Create a text field, you should see a fieldset titled "Conditional fields settings", open that and choose "1 field"
  3. Do a similar process to create a textarea and imagefield but choose "2 fields" in the conditional fields settings.

Now when creating a content type, when changing the value of the select box will show different fields on the form.

More information:
Example Screenshots
Documentation for Conditional Fields


Check out the Display Suite module. The easy way to do this is create a build mode for each view and enable the "switch build modes on node page" option - then you can override the text values of the build mode selector.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜