More in this section

Forums / Developing with Sitefinity / Multiline Custom field in News module

Multiline Custom field in News module

4 posts, 0 answered
  1. Shubhashini
    Shubhashini avatar
    4 posts
    Registered:
    07 Feb 2011
    31 Oct 2012
    Link to this post
    We need a Multiline textbox (like Summary field) in News module. If we add Custom field of Long text, it is giving Rich text editor, but we need a Multiline textbox where we can enter only 8 to 10 lines of text.
  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    12 Nov 2012 in reply to Shubhashini
    Link to this post
    Hi Shubhashini,

    You have a good point here. It isn't possible with the default content modules to choose a textbox instead of a RadTextEditor.

    @Sitefinity Team: maybe good to line up the custom field options with the ones from the Dynamic Modules. To me it seems that the Dynamic Modules are almost far more advanced as the default Content modules.

    Thanks!
    Daniel
  3. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    13 Nov 2012 in reply to Shubhashini
    Link to this post
    Shubhashini,

    If you're using Visual Studio, this is very easy to do using Sitefinity Thunder.

    1. Create a new "Sitefinity Field Control", name it whatever you like. (Ex: TextAreaField.cs)
    2. Open up the "TextAreaField.ascx" file that gets generated and change the asp:TextBox to include the TextMode attribute. Be sure to set it to "MultiLine" :)
    3. After you build, you'll be able to use the new Field Control by selecting the "Custom..." option when adding a new Custom Field. (and entering the control class...)
  4. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    15 Nov 2012 in reply to Tim
    Link to this post
    @Tim: yes, thought of that, but when speaking in terms of 'a polished CMS', I think it should be working as with the dynamic modules.
4 posts, 0 answered