Try our conversational search powered by Generative AI!

XForm in EPiFields?

Vote:
 
Hello, Has anyone here tried or does anyone know if it's possible to have an XForm within an EPiField? I've tried to do it but can't get it to work properly, help or information about if it's at all possible or not is very much appreciated. Best regards Martin
#12888
Jan 04, 2007 17:03
Vote:
 
I havent tried this myself. Could you describe the problem a little more? What PageAdapter are you using to render the XForms page? Regards, Johan Olofsson
#15038
Jan 05, 2007 10:15
Vote:
 
I can try to explain briefly what I've done and what the problem is. I'm not that skilled when it comes to EPiFields so perhaps you see some fundamental error. I've created a web control that inherits from PageAdapter and has the attributes for EPiFields, like sPageTypeGUID and so on. Then I've created a web form where I show this web control. I've created a page type pointing to this web form. In this page type I've declared a property of the type form with the same name as the property control in the web control. I've created a page of this page type under my "EPiFields tree structure" and a small form for this page. In this part of the tree structure the form shows up the way it should, but when I try to include it in a "EPiField editor" I get an error message saying "[Error: No property "MainForm"]". Can you see something obviously wrong here or is it not possible to do what I'm trying to do? /Martin
#15039
Jan 08, 2007 11:08
Vote:
 
Can you verify that it's really your intended pageadapter that really gets selecetd when you try to insert the page? Check the dropdown list called "Page Adapter" in the EPiFields dialogbox. It sounds to me like another pageadapter gets selected, which simply tries to render the common "MainBody" property through the EPiServer.WebControls.Property control. Regards, Johan Olofsson
#15040
Jan 09, 2007 16:27
Vote:
 
I think the correct PageAdapter is chosen because I also have a simple button and a label in the PageAdapter web control, just to test the PageAdapter, and they are both shown on the page. When the button is clicked it writes a text to the label so that works fine. And it's not the MainBody property it tries to render but instead my MainForm property which is a XForm. Best regards Martin
#15041
Jan 10, 2007 8:50
Vote:
 
Sorry, my mistake! I think the problem here is due to referencing the incorrect "CurrentPage". In Your PageAdapter you would have to refer to the member "CurrentPageReference" to get the page that was actually *inserted* in the editor (and which would contain the property "MainForm"). If you try to get "CurrentPage" through the parenting aspx-page, it would refer to the page which *hosts* the control, and it would probably not contain the needed property. Here's an sample pageadapter that renders the property "MainBody" from another page, the same logic would be applied in your scenario: [ PageAdapter(...)] public class PageProperty : PageAdapter { protected EPiServer.WebControls.Property propertyControl; protected void Page_Load(object sender, EventArgs ea ) { propertyControl.PageLink = CurrentPageReference; propertyControl.PropertyName = "MainBody"; } } Regards, Johan Olofsson
#15042
Jan 15, 2007 10:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.