Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p {mso-style-noshow:yes; mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
Hi All
Just wondering if it is possible to limit users on what they can enter for a nodename?
I have a few users that are writing a short story every time they create a new node and would particularly like to restrict the characters length.
Cheers
Evan
Opps...sorry, pasted text from office..
Hi Evan,
Don't think there's currently a limitation on number of chars, but you may find the dialog for creating a new node and add some jquery to it to limit the number of chars in a textbox, right? You'll find multiple examples on the web.
Cheers,
/Dirk
Tim has made one - or at least got pointers to one:http://www.nibble.be/?p=62
You can also use an action handler (BeforePublishHandler) which checks the char length and on failure it doesn't allow to publish only saving.
hth,Thomas
Action handlers : http://umbraco.org/documentation/books/creating-and-using-an-action-handler
Also check out the Document.BeforeSave event, it doesn't work in the current Umbraco versoin (4.0.2.1) But according to Aaron (Slace) this bug should be fixed in the 4.1 release: http://www.aaron-powell.com/blog/august-2009/umbraco-41-alpha-release.aspx
Thanks for the help. I've been out of action for a few days so I'll start trying some of the suggestions today.
I am still looking at all of these options but I have found a simple solution based on what Dirk said.
I found the Create dialog for content, /umbraco/create/content.ascx
Then added an asp:RegularExpressionValidator to it with a RegEx to limit the number of characters.
Thanks for the Help
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Node Name Validation?
<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p {mso-style-noshow:yes; mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman";} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-style-unhide:no; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
Hi All
Just wondering if it is possible to limit users on what they can enter for a nodename?
I have a few users that are writing a short story every time they create a new node and would particularly like to restrict the characters length.
Cheers
Evan
Opps...sorry, pasted text from office..
Hi Evan,
Don't think there's currently a limitation on number of chars, but you may find the dialog for creating a new node and add some jquery to it to limit the number of chars in a textbox, right? You'll find multiple examples on the web.
Cheers,
/Dirk
Tim has made one - or at least got pointers to one:
http://www.nibble.be/?p=62
You can also use an action handler (BeforePublishHandler) which checks the char length and on failure it doesn't allow to publish only saving.
hth,
Thomas
Action handlers : http://umbraco.org/documentation/books/creating-and-using-an-action-handler
Also check out the Document.BeforeSave event, it doesn't work in the current Umbraco versoin (4.0.2.1) But according to Aaron (Slace) this bug should be fixed in the 4.1 release: http://www.aaron-powell.com/blog/august-2009/umbraco-41-alpha-release.aspx
Thanks for the help. I've been out of action for a few days so I'll start trying some of the suggestions today.
Cheers
Evan
I am still looking at all of these options but I have found a simple solution based on what Dirk said.
I found the Create dialog for content, /umbraco/create/content.ascx
Then added an asp:RegularExpressionValidator to it with a RegEx to limit the number of characters.
Thanks for the Help
Cheers
Evan
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.