How to create a dependent string field

Hi,

How can I create a dependent string field which observes the value of a compound field(Having dropdown fields).

For example, if in the compound field the values are selected as News,Politics I want the string to have its value as News,Politics.

I know that there is observer and observable id for dynamic dropdown but I needed something like this for the string.

Is there any out of the box functionality in Hippo that I can configure? If not is there a way to develop this functionality? Any thoughts?

Thanks,
RK

I don’t think there’s a super-easy way. But you might want to try a client-side solution like this:

  • William demonstrated how to create a custom head contribution plugin (which could be added to a document type namespace editor:template definition) to add your custom javascript library. [1]
  • You can set custom CSS class names for a field in the document type editor.
  • Your custom Javascript can possibly do some magic. e.g, add onchange event handler to HTML elements having a specific CSS class to read those and update another HTML element having another specific CSS class.

Yeah, it’s not clean. I have no other idea.

Woonsan

[1] Redirecting to Google Groups

Thanks for the response Woonsan. Will give a try.