It looks like something pretty easy, but I can't find how to do this.
I need to clear value for some field via javascript. It could be regular text , component link , keyword or dropdown field type. I have following code:
var field = $display.getView().properties.controls.fieldBuilder.getField("some_field");
field.clear();// I need somesting like this
Is it possible to do this in elegant way or I have to look into DOM and clear it manually separately for each field type?
FieldBuilder
has aclearContents()
method described in the documentation. Would that work for you?