Page 1 of 1

Error when saving new form

Posted: 27 Jan 2017
by Exp.AB
Hi guys.

My version is 3.0.8.

I have a simple new form that only contains three fields: Title, Lookup field, HTML.

This will be the child list for a parent list, I am following this blog: http://spform.com/forms-designer- ... ms-control

I have put in the code in the JS, and the html code in the html field. When the CDATA is TRUE then I can save my form. If the CDATA is FALSE (in the blog it says CDATA=false) I get an error when saving the form.

Can you tell me why this error is happening?

-------------------------

This is the error:

System.Xml.XmlException: '__designer' is an unexpected token. Expecting white space. Line 30, position 105.
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
at HQnqIWpqg5aFHCboLJ.U44DQi4oiTrlBd6HYL.FyXauyg8ON(SPLimitedWebPartManager , String , Forms , XDocument )
at a3TEBbRGCZhtP1NwLr.f3iM7Jkhq3kcKyJSsl.CKIzpBgfo(Guid , Forms , XDocument )
at a3TEBbRGCZhtP1NwLr.f3iM7Jkhq3kcKyJSsl.VpJ9lPpdl(Guid , Forms , XDocument )
at FormsDesigner.Sharepoint.FDService.PublishForms(Guid listId, String contentTypeId, Guid groupId, Forms forms, String layout, ServiceFault& fault)

Re: Error when saving new form

Posted: 30 Jan 2017
by Dmitry Kozlov
Hi,

Could you provide content of your HTML-field?

Re: Error when saving new form

Posted: 31 Jan 2017
by Exp.AB
Hi :)

Yes the html field contains the code you supply in the blog I mentioned:
http://spform.com/forms-designer- ... ms-control

The html code is:
<div id="_fd_parent_temp">

<asp:HiddenField runat="server" ID="_fd_parent_tempField" __designer:bind="{ddwrt:DataBind('i','_fd_parent_tempField','Value','Load','ID',ddwrt:EscapeDelims(string(@ID)),'@_fd_parent_temp')}" /> </div>

Re: Error when saving new form

Posted: 31 Jan 2017
by Dmitry Kozlov
I have tested the code in both Forms Designer for SP on-premises and online, both were saved properly. Could you export the form into a file (use Export button in the ribbon of Forms Designer) and send it to support@spform.com. What's your SharePoint edition?

Re: Error when saving new form

Posted: 31 Jan 2017
by Exp.AB
Hi, I have sent an email with all information and screenshots :)

Re: Error when saving new form

Posted: 01 Feb 2017
by Dmitry Kozlov
Hi,

You missed a space between ID and __designer:bind attributes. The code must be:

Code: Select all

<div id="_fd_parent_temp">
<asp:HiddenField runat="server" ID="_fd_parent_tempField" __designer:bind="{ddwrt:DataBind('i','_fd_parent_tempField','Value','Load','ID',ddwrt:EscapeDelims(string(@ID)),'@_fd_parent_temp')}" />
</div>

Re: Error when saving new form

Posted: 01 Feb 2017
by Exp.AB
Thank you Dimitri, I thought I had done a copy paste on the code, sorry for this.

I can now save the new form in the designer.


Another issue is happening when creating parent item with child item.

I create a parent item, with new form.
In the parent new form, I create a child item, fill the child form and hit save.
When returning to the parent new form, there is no child item visible in the parent form. Even though I have set the view to display new items (as told in the blog).
But I save the parent new form.
Open up the child list and see the chld item I just created but it has no parent ID in the lookup column that I created as described in the blog.

Am I missing something obvious? I have followed the blog step by step, over and over again without results.

I have screenshots that I have sent you in an email :)

Kind regards AB.

Re: Error when saving new form

Posted: 01 Feb 2017
by Dmitry Kozlov
You missed $ in the JS-code in the child form. Must be:

$('#_fd_parent_temp > input').val(window.top.fd._tempParentId());