Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Setting default value for CQ.form.SizeField

Avatar

Level 1

How can I set the default value of a sizefield component as a property?

This component actually has two values "heightParameter" and "widthParameter", but here specifies "defaultValue" as a single String and "value" as Mixed.

1 Accepted Solution

Avatar

Correct answer by
Level 10

hmmm...  Can you try workaround having processRecord & defining fuction to set it manually. 

processRecord="function(record, path) {this.setHeight(23);this.setWidth(23);}"

View solution in original post

3 Replies

Avatar

Level 10

.setHeight(23)
.setWidth(23)
OR

.setSize(23,23)

Avatar

Level 1

Hi Sham,

thanks for your reply, but I need to set it in the node properties. In other widgets I've done it succesfully, but usually it involves a string or a number. In this case is a pair of values (width and height).

Avatar

Correct answer by
Level 10

hmmm...  Can you try workaround having processRecord & defining fuction to set it manually. 

processRecord="function(record, path) {this.setHeight(23);this.setWidth(23);}"