It's not different, but it would be nice to be abl...
# suitescript
m
It's not different, but it would be nice to be able to do
Copy code
form.addField({
  id: 'textfield',
  type: serverWidget.FieldType.TEXT,
  label: 'Text',
  isMandatory: true,
  maxLength: 64,
  defaultValue: 'Insert Text Here.',
});
instead of
Copy code
var field = form.addField({
  id: 'textfield',
  type: serverWidget.FieldType.TEXT,
  label: 'Text',
});
field.isMandatory = true;
field.maxLength = 64;
field.defaultValue = 'Insert Text Here.';