Developer forum

Forum » Development » Bug when saving the definition of an item type with a TextParameterEditor parameter, having the TextArea=true option

Bug when saving the definition of an item type with a TextParameterEditor parameter, having the TextArea=true option

Emil Dumitrescu
Reply

Hello,

When defining a custom item type editor control, for a TextParameterEditor with the option TextArea=true; the value is not saved when the definition of the item type is saved (I've attached an image):

 [AddInLabel("Sql query"), AddInParameter("SqlQuery"), AddInParameterEditor(typeof(TextParameterEditor), "NewGUI=true;TextArea=true;")]
 public string SqlQuery { get; set; }

If we remove that TextArea=true; option, everything is fine, but the rendered control is a simple one line input html element, and not a textarea as desired.

Regards,

Emil Dumitrescu

 

Screenshot_2020-03-11_at_14.34.01.png

Replies

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply
This post has been marked as an answer

Hi Emil,

try to add css class "editor-parameter" to control:

 [AddInLabel("Sql query"), AddInParameter("SqlQuery"), AddInParameterEditor(typeof(TextParameterEditor), "inputClass=editor-parameter;TextArea=true;")]
 public string SqlQuery { get; set; }

Best regards,
Vladimir

Votes for this answer: 1
 
Emil Dumitrescu
Reply

It works fine with this css class, thanks Vladimir!

 

You must be logged in to post in the forum