Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > CMS.Office Doc Type View modes: 
User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 11/15/2013 4:26:01 PM
   
CMS.Office Doc Type
I am making a webpart to load an alternative form for the cms.office doc type. I have then surfaced this control in a page. The problem that I am encountering is that when I enter data and save the form, it doesn't seem to create a new cms.office page. I noticed on the myprofile webpart that they have eventhandlers for onaftersave and onbeforesave, but these don't seem to set anything that I would need. Should the form not handle the saving of the data on its own? I have checked to make sure that the required fields are included in the alternative form.

Basically we want a way for an authenticated used to create a company on the front end of the site, as a way of collecting data for the user's company. The form is loading up into my page correctly, but not saving the information. Any ideas?

User avatar
Certified Developer 9
Certified Developer 9
charbf - 11/15/2013 11:22:17 PM
   
RE:CMS.Office Doc Type
Why not use the contribution list webpart?

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 11/16/2013 9:00:34 AM
   
RE:CMS.Office Doc Type
The main reason we want to use office is because the input will be companies and addresses. All of this is built into the doc type, we just don't need to collect all of the information up front, which is where the alternative form comes in. I created an onaftersave event for the form in the web part so now a page is created under companies, but I am not sure how to set the rest of the document attributes, ie. office address, office city, etc.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/25/2013 1:13:53 AM
   
RE:CMS.Office Doc Type
Hello,

Still, you could use the user contributions for this document type and set your alternative form in it. Mark the fields as not mandatory if you do not need the data in them. Also, you can then use the custom event handlers if you would like to fill the data in automatically - e.g. before or after insertion.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 11/25/2013 10:51:32 AM
   
RE:CMS.Office Doc Type
I have tried to use this approach briefly; however, it doesn't seem to use the form, just creates a new page. It won't actually show the fields of the office doc type that are in my alternative form, instead it is just showing the four default fields for creating a blank page(menu item). Have you verified that this approach works? Could it be something in my settings or setup?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/27/2013 1:43:17 AM
   
RE:CMS.Office Doc Type
Hello,

I am sorry but I do not understand what do you need exactly. What form is not used? What page is created? Are the fields set in the alternative form? Are the default fields hidden on the alternative form? what were the exact user contribution web parts settings?

Best regards,
Juraj Ondrus