-
I'm glad you got it working, however I would like to make a corrective statement:
You can programmatically add them to an optional section -- provided the optional section exists in the DOM (i.e. it's optionally THERE as opposed to optionally NOT THERE).
However, as stated ealier, do not try to use 'ExecuteAction'. Instead build the nodes in ...
-
So are you trying to set the ''value'' of the rich text field, or append new nodes to the rich text field.. that's where I think the key difference is.
i.e. thisXDocument.DOM.selectSingleNode(''myRichTextField'').text = ''<div xmlns=\''http://www.w3.org/1999/xhtml\''>test</div>''; will only give you the text.
You need to create a new ...
-
Great! Glad to hear you got it solved!
-
After creating the XmlNode (oElement1), you should be able to directly append it to your DOM... not sure why your returning the OuterXml, etc.
Also, you need to make sure that your element is created using the same namespaces as your DOM you want to insert it into. It looks like you are probably doing that, but you need to make sure because you ...
-
SharePoint will only promote the new properties when forms have been saved AFTER the update to the properties. So newly saved forms will show those properties, but old ones won't until you save them again. There's other ways to do it to (in bulk), but I can't think of them at the moment.
-
This works in C#, but you need to be using an IXMLDOMDocument2 (or 3) as the regular IXMLDOMDocument does not contain the setProperty method.
-
You cannot simple assign a text value, like other fields, to a rich text box and expect HTML to come out the other side. Text is text is text. You need to build an XHTML DOM (note that Rich Text has a special namespace that it expects to be used on every top level node which you can find by creating a sample app and saving an XML file with Rich ...
-
You need to use a rule on the drop-down list box.
The rule will set the value of the field. The value set will be filtered based on the selected value in the drop-down:
field = SpList/textValue[../ddValue = (MAINDOM)/ddValue]
The above is not exact, just to give you an idea what to do.
-
There is a property to check: thisXDocument.IsNew
-
I think I answered this question (vaguely enough) in another of your posts wherein I mentioned that you will need to create the nodes in code, and then insert of append them to the proper location.
There should be plenty of tutorials online on how to do create an XmlNode and insert it into an existing DOM. Visual Studio help will probably also be ...