Setting default value for CQ.form.SizeField | Community
Skip to main content
rafa_osudio
October 16, 2015
Solved

Setting default value for CQ.form.SizeField

  • October 16, 2015
  • 3 replies
  • 926 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

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

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

3 replies

Sham_HC
Level 10
October 16, 2015

.setHeight(23)
.setWidth(23)
OR

.setSize(23,23)

rafa_osudio
October 16, 2015

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).

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

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

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