I have a richtext field in the form to enter text and store attachments. In xpages, i have used multiline edit box control to enter text and file upload control to attach files in richtext field. Both the controls are binded to same richtext field.
If I attach file using file upload control and enter text in multiline edit box, i see the text being stored in the document and attachment being omitted. How to achieve in storing both attachment and text in the richtext field ?
You can't bind 2 controls to one backend field. They will overwrite each other. Keep them separate. For your specific problem the RichText Editor Evolution might be the solution. It uses a bean to put things together.
You will need to change your RichText to "store MIME"
Related
I would like to increase width of lotus notes text field on web, I have tried
width="48"
On html tab of the field and put there in style tag but that is not working.
Basically I am having comment field which wherein I would like to increase width of the field so user can see enter long text instead of typing and getting moved.
P.s I know richtext field which can have cols and rows property but I dont need rich text field. I just need simple text field.
Use colon and not an equals sign and add px. So do this instead:
width:48px;
I have multifield richtext in my dialog.When i try to author it the value will get author properly But when i open dialog again the value wont be there in dialog.Can some one share multifield js.My multifielfd dialog contains richtext,path,text?
I have a form, say A, inside this form I'd like to have an editable text field which can be maintained by a CMS content editor.
I was told that we cannot do it.
So I am wondering that can we make an editable text field some where else, e.g. the Webpart which contains the form, and display the text inside the form A?
Also, I do not want to save the text into the data table which maps to this form.
Here is the form
"Our staff will endeavour to respond to your message within 2 business days."
This is the text that I want to make an editable text field for.
If the editable text is NOT part of the form then there is no need to have it "inside" the form or as a form field. You have a few options to add this editable text:
Inside any WYSIWYG editor, you can place a form or use the widget to add a form. As long as your editable text is outside of the actual form, you can place this text before or after the form widget.
In the form itself, add a new Layout and place the form field labels and value macros as well as your custom text inside there.
You can create Categories which will group fields underneath that category together on the form. See image below for an example. This is a good way to store some "grouping" text for those similar fields. This has to be edited within the form itself.
How to hide an attachment in a Lotus Notes document pasted in a rich text field?
Using attach icon the attachment can be hidden using hide-when formula !#IsNewDoc, if it is pasted it remains visible even in case of the same hide when formula.
(Lotus Notes 8.5.3 client)
After saving and reopening the document, the attachment is still displayed. (Is seems #isnewdoc does not work)
It does work the way you described BUT after setting hide-when formula you have to close and reopen the document because the formula !#IsNewDoc hides the attachment only if document is not new.
Even if you edit an existing document you have to
press F9 or
select menu View/Refresh
after setting hide-when formula. The hide-when formula doesn't work right away. The document has to be recalculated before hide-when formula takes affect.
EDIT:
You have a form with a RichText field. This has a hide-when formula !#IsNewDoc. Normally, all content disappears when document is saved and reopened. But, if user copies an attachment from another Notes document's Richtext field the attachment stays visible.
Why? If you copy an attachment from another RichText field then not only the attachment is copied but also all properties. In this case the property hide-when is empty for copied attachment.
Here is a solution:
Create a subform "AttachmentsNewDoc" with RichText field without any hide-when formula.
Create a subform "AttachmentsExistingDoc" with RichText field inside a collapsed section with hide-when formula 1.
Include in your form a calculated subform with formula #If(#IsNewDoc; "AttachmentsNewDoc"; "AttachmentsExistingDoc")
Rich Text fields can not normally be hidden. The rich text itself can contain hide-when formatting.
So you have to use a work-around if you need/want to hide the attachments.
I would use the computed subform trick for this.
Yes, for documents already saved, you need to go to the richtext field and check all items (files) to make sure the hide when on these are set correctly.
I need to check if a field is of type "Rich Text" using #Forumla in a View. How can I achieve this?
Alternatively, check the byte size of a field also using #Forumla in a View.
You can turn Rich Text into plain text using the #Abstract formula, and then display that in the view. Unfortunately #Abstract does not work in views.
If views themselves won't get the job done, you can always use an agent to process the documents and set a document item value, which in turn can be shown in a view. It's an extra step but often can get the job done. Using LotusScript you could loop through all the document's items and check if they are a RICHTEXT type, and then stamp the document with an "IsRichText" item set to "Yes", for example.
Formula language will not show these values. The closes you can get is #Length. If it is possible in the design, calculate these values is a separate field using lotus script.