Error when saving new form

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Exp.AB
Posts: 5
Joined: Fri Jan 27, 2017

27 Jan 2017

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)

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

30 Jan 2017

Hi,

Could you provide content of your HTML-field?

Exp.AB
Posts: 5
Joined: Fri Jan 27, 2017

31 Jan 2017

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>

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

31 Jan 2017

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?

Exp.AB
Posts: 5
Joined: Fri Jan 27, 2017

31 Jan 2017

Hi, I have sent an email with all information and screenshots :)

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

01 Feb 2017

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>

Exp.AB
Posts: 5
Joined: Fri Jan 27, 2017

01 Feb 2017

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.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

01 Feb 2017

You missed $ in the JS-code in the child form. Must be:

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

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests