Link to home
Start Free TrialLog in
Avatar of notesrookie
notesrookieFlag for United States of America

asked on

Cannot see entire text field in web form in edit mode

Hello all,

This is strange to me but probably not to you. When the form I am in on the web is in read mode I can see the entire text field. When I place it in edit mode it gets choped off. The field appears to be about 5cm in width and I have not been able to change the width of it to accomodate the entire text line. I even tried going to Native OS Style and that didn't work. If you could provide me with some insight on this it would be greatly appreciated.
Avatar of cezarF
cezarF
Flag of Australia image

try to put something like "size=30" in the HTML Attributes of the editable field.

hope it helps
"size=100%" will auto adjust the field's width depending on the width of the table/form
Avatar of marilyng
marilyng

Hi notesrookie,
the size=30 will work for a single row.  Here's my workaround for 5.12 multi-lines of text....

Let's say you have a field called: comments

On the Notes Client side its:

Enter your comments:  [comments]             << HIDE FROM WEB USERS
Enter your comments: <textarea name="comments" cols="65" rows="5"></textarea>  
                                                     <<HIDE FROM NOTES, and make tags passthrough html
                                                         also, hide if document is not being edited.
Enter your comments: <computed text>                                  
                                                      <<NOT PassthroughHTML, Hide from Notes, and hide if document is being edited.  
                                                           Computed text is = comments


$$RETURN can reopen the form in read mode, since if you hit a "SAVE" button, stuff entered into the textarea disappears on click...:)

Haven't been able to make rows=M cols=N work on anything but rich text, list fields.

Maybe this will work for you..
Regards!
cezarF,
You know, I tried that, too... and it will expand the text field to the width of the browser or table, but not increase the rows.  (this is R5.0.12)
Then I tried the OS with a size dynamic height,  but it seems, and I can be wrong, that textarea field just doesn't translate in Notes...
hmmm....
to increase the row, add >> height:200 << in the style in the field property HTML tab

cezarF,
> height:200
Ah, well it does increase the rows.. you have to remember to set the multivalue separations to both new line, but then the width goes away no matter what value you enter for the size.

So, without the mutlivalue separators, you get the 75 size, but you can't add new lines.  It won't wrap the lines.  When you set the multivalue stuff, the width defaults to (it looks like 40 px)
marilyng, true, but my suggestion is for single value text field not one with multi-vlue. is notesrookie talking about a text area (multi-value)?
marilyng,
Ok, got this to work... add a computed field: comments_stored with the formula = "comments"  Hidden.

Then revise the html tag:

<textarea name="comments" cols="65" rows="5" wrap=virtual onchange="document.forms[0].firstname.value = document.forms[0].comments_stored.value"><Computed Value></textarea>

computedtext = comments
notesrookie,
oops, that last comment should have been to you. Solly!
cezarF,

I would think so.. since she's saying that when the field is opened in the web in one of those modes, the lines are truncated.

Well, if not, then she has both... mine is to emulate a text field where you can enter many lines of text, and add line breaks.  

I could only get yours to wrap with the height added, and the multivalue setting ON, else it just scrolled to the right. :)  Ah the oddities of R5.0.12
marilyng, i think she's referring to a long singlevalue text field. :)
Avatar of notesrookie

ASKER

The field in question is single value text that offers a brief explanation of a problem. So there may be the possibility that the value in the field gets long enough to require a line break. Let me take a looka dn see what turns out. Thanks.
Like I said, she has both solutions..both have advantages and disadvantages, irrelevant to second guess and say one is better than the other,  since we don't have the application in front of us.

happy testing notesrookie!
marilyng,

Would you please help me with more clarification?

Enter description: field called comments, text, editable, only show in Notes
Enter description: field called comments_stored, computed, value from comments, hidden
Enter description: html tag <textarea name="comments" cols="65" rows="5" wrap=virtual onchange="document.forms[0].firstname.value = document.forms[0].comments_stored.value"><Computed Value></textarea>, show only on Web

For document.forms[0].firstname.value, what field is this? Also what is the formula for the computed value area, comments_stored? Thanks.
Oops - more questions. If there is already a value in the comments field, how do I get it to show up on the web? And once a comment is typed in on the web how do I get it to show up on the Notes side of things. I'm having a disconnect as to how they feed their values to each other. Thanks.
>>document.forms[0].firstname.value<< oops.  my testfield name was firstname.  firstname = comments

The web form creates a "virtual" field called "comments", it's value is only stored on the form as long as it's open in the browser.   But, you can grab the value using client side javascript.

The comments_stored notes field is a computed field, that will pick up the value of "comments" and store it for Notes in a container that Notes recognizes.

Usually, when I have a form that needs entry from both the Notes and Web side, then I open either the web-side or the notes-side form (one visible to notes, one visible to web) only because I don't want to try and write all sorts of values into comments_stored.

Comments_stored value is set when the document is saved, so it's empty when the submit button is hit, but the value shown is in the computed Value of comments.

Let me turn on R5 and test to see if the stored value can be accessed using a default formula, or if you have to push it via javascript
Thanks, marilyng. I appreciate the help.
ASKER CERTIFIED SOLUTION
Avatar of marilyng
marilyng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have not been able to get my web document to save when I've made an addition to the comments field. My Save action button contains the following and I do not have a $$Return button. I'm not even getting a form processed. Any ideas?

@Command([FileSave]);
@Command([OpenView]; "vView")
Well, you either need a $$Return with something like this:

db:=@If(@Subset(@DbName;1)="";"http://localhost/"; "http://" + @Subset(@DbName;1)) + @ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName;-1)+ "/Default View?OpenView";" ";"%20");"\\";"/");
@URLOpen(db)

or some logic that you want to evaluate - such as returning a Thank You.

Or you need to put something inthe webquerysave event to tell the browser what you want to do.

@Command([FileSave]) will submit the form.  @Command([FileCloseWindow]) will return a form processed, but leave the user with no where to go.
Ahh, that's the missing link, the webquerysave event. Let me muddle some more about that. Thanks.
Open the discussion notes and web template, and check out the websubmit, and the webquerysave along with the $$Return forms.
Thanks for all your help, marilyng. I was not able to use your solution for having the value input on the web show up in Notes and vice versa but was able to use something else instead. I'll probably re-visit this in the future.
Well, you could have asked customer service to refund your points if you post the solution that you used. :)
I won't be doing that as your suggestion were well worth those points. It certainly pointed me in the right direction, hence my accepting it.