Comments on Web

I am trying to get some comments to work on the web. Wanna use something like this (but this is Notes only)… but would prefer a popup dialog box (e.g. javascript) that appends to a computed field.

update: The @DialogBox does work (sort of) on the web. It just works once… and doesn’t append additional lines. Maybe I can insert an “add comments” button next to editable field with this formula + add something to force it.

ret := @DialogBox( “tmpComments” ; [AutoHorzFit] : [AutoVertFit] ; “Support Comments” );

@If(ret != 1 ; @Return(“”) ; Continue);

FIELD Comments := Comments;

FIELD Comments := Comments + tmpComments + " - " + @Text(@Now) + " by: " + @Text(@Name([CN]; @UserName)) + @NewLine ; “” ;

FIELD tmpComments := @DeleteField;

Maybe I can use the part past the @Dialog… any thoughts? It doesn’t have to be a popup… could just be an editable field that appends to computed one.

Subject: Comments on Web

I have also tried this… with and without filesave at the end. Have tried (saw a suggestion in the forum) adding the following passthru. I could be doing something out of order.

note: it seems to erase field and add multiple lines but after 3-4 clicks it goes to 1 item.

FIELD Update := NewComment;

FIELD UpdateLog := CommentLog;

@If(CommentLog = “”;

@SetField(“UpdateLog”;@Text(@Now) + “: " + Update +”: "+ @Name([CN];@UserName));

@SetField(“CommentLog”;CommentLog + @NewLine + @NewLine+ @Text(@Now) + “: " + NewComment +”: "+ @Name([CN];@UserName))

);

@SetField(“NewComment”;“”);@Command([FileSave])

Subject: RE: Comments on Web

I adjusted the formula a bit… keep author and time/date on 1st line with comments on 2nd. Seems to work fine… just tried to turn the NewComment field into a richtext lite (using HTML) but received a page cannot be displayed. Maybe a mismatch somewhere…

FIELD NewComment := NewComment;

FIELD CommentLog := CommentLog;

@If(CommentLog = “”;

@SetField(“CommentLog”;@NewLine+ @Name([CN];@UserName) +" "+@Text(@Now) + ": " + @NewLine+ NewComment +@NewLine);

@SetField(“CommentLog”;CommentLog + @NewLine+ @Name([CN];@UserName) +" "+@Text(@Now) + ": " + @NewLine+ NewComment +@NewLine)

);

@SetField(“Update”;“”);@Command([FileSave])

Subject: RE: Comments on Web

Used @Text around NewComment and it worked. I was just using RT Lite field to get more real estate.