NetTalk Central

Author Topic: On a NetWebForm how do I omit NT generated field comments  (Read 4914 times)

RichCPT

  • Newbie
  • *
  • Posts: 15
    • View Profile
On a NetWebForm how do I omit NT generated field comments
« 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?

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #1 on: June 21, 2020, 01:02:45 PM »
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.

Quote
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

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #2 on: June 21, 2020, 10:03:08 PM »
There's also this

Peter

RichCPT

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #3 on: June 22, 2020, 07:22:00 AM »
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.

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #4 on: June 22, 2020, 07:34:16 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #5 on: June 22, 2020, 10:22:49 PM »
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

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: On a NetWebForm how do I omit NT generated field comments
« Reply #6 on: June 23, 2020, 07:03:44 AM »
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