Hello Kentico guru's,
For a project i'm working on, i'm trying to create a Page type in which the editor can select a form (which has been created with the forms application). I have the feeling that i am really close to achieving what i want, but the last bit is not working.
I've added a dropdown-list field to my Page type which uses SQL to get the available forms (select FormID, FormName from cms_form). So far its working and the editor can select the right form. But now i want to render the selected form in my transformation and thats where i'm stuck. Through the q&a section over here i've found out the following code which i can use to retrieve the form:
<cms:BizForm runat="server" ID="BizForm" FormName="FormName" EnableViewState="false" />
This works great when i enter a name value manually, but when i try to use the field from my page type (make it dynamic), like this:
<cms:BizForm runat="server" ID="BizForm" FormName='<%# Eval("fieldFromPagetype") %>' EnableViewState="false" />
The form is being rendered empty, like so:
When i output
<%# Eval("fieldFromPagetype") %>i do get the right form name, and if i copy/past it manually the form works great. I also tried to convert it .ToString(), but to no avail.
How can i render out the form dynamically? Please help :)