Default Value in RecordField throws JavaScript error on execute

Adding following Record Fields to the GridPanel Store makes the site throw a JavaScript Error
Uncaught SyntaxError: Unexpected identifier to the Chrome Console

<ext:RecordField Name="listname" AllowBlank="false" DefaultValue="Listname" />
<ext:RecordField Name="recipients" AllowBlank="false" DefaultValue="Listmembers" />
<ext:RecordField Name="usage" AllowBlank="true" />
<ext:RecordField Name="responsible" AllowBlank="false" DefaultValue="please add Responsible Person(s)/ Group(s)" />

Firebug console gives following error:

SyntaxError: missing } after property list
[Break On This Error]     
...,name:"responsible",defaultValue:please add Responsible Person(s)/ Group(s)}]}),...
---------------------------------------------|
admin.aspx (line 16, col 60)

It looks as if the Default Value is not correctly quoted as String, how can I fix this?

Answers:

Answer

It seems the default Value of a Record Field is generally supposed to be a javascript variable.
double-quoting it defaultValue="'foo bar'" fixes the problem

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.