NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: RichCPT on June 21, 2020, 09:47:21 AM
-
On my NetWebForm procedures I do not want NT generating the field comments like, "A Number", "Required", "mm/dd/yyyy".
These comments all appear in DIV's with a CSS class of "nt-form-grid-cell nt-form-grid-cell-comment".
I'd really prefer not to generate these comment DIV's at all.
How can I tell NT not to generate them?
-
If you just don't want default text in the comments, you can put an empty string ('') in the Comment field on the Field tab of the template window for that field.
If you don't want the div stuff to appear at all, I think you'd need to go into the source code and exit out of the Comment::fieldname routines that generate the comment divs. And tick the "Span Value/Comment" checkbox on the template window for the field.
Comment::LOC:SurveyHideResolved Routine
data
loc:fieldclass string(StyleStringSize)
! Start of "Comment Data Section"
! [Priority 5000]
! End of "Comment Data Section"
code
! Start of "Set Comment"
! [Priority 5000]
EXIT
-
There's also this
Peter
-
Jane, putting in an empty string on the "Comment" field, instead of leaving it blank, had eluded me, thanks for that tip.
Peter, "Generate Automatic Comments" on the "Validations" tab is the setting I had been looking for, thanks for that.
All,
I also discovered that I can un-check the "Last on Line" and "Last on Cell" boxes which then enables the
"Suppress Comment" checkbox (3rd property from the bottom of the "Field" tab) which I can then checkmark! Once that is checkmarked, I can then turn "Last on Line" checkbox on.
However, check-marking "Last in Cell" will clear the "Suppress Comment" checkbox.
-
Rich,
It appears to me that both the empty string in the "comment" field and also the "generate automatic comments" will still wind up with the comment DIV stuff being generated.
Not that that matters, but since you said you'd prefer those DIVs not be generated at all it seems to me the only way to prevent that is exiting from the comment::fieldname routine(s).
Cheers,
Jane
-
Hi Jane,
There's also an option on the form layout tab to Suppress comments.
this suppresses all the comments for all the fields on the form.
Cheers
Bruce
-
So many choices!! ;)
I never tried that checkbox. Unlike clearing the "generate automatic comments" checkbox, the "suppress comments" does indeed kill everything - including the comment divs. Even removes the comment::fieldname routines from the generated code.
Thanks, Bruce.
Jane