Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Changes in auto-generated form View modes: 
User avatar
Member
Member
paxer - 10/1/2009 1:22:19 AM
   
Changes in auto-generated form
Hi Guys!

I have a small question how is it possible to do.
Please look on this image

User image

As you can see this is default generated by Kentico engine Add/Edit form for document type (in my case this is Message Board).

The question is that client want to have "Save" and "Spell check" buttons at the bottom of this form, or at least duplicate them at the bottom. It's actually sounds logical, especially when user have a big form he need to scroll up at the top of it after form has been filled, for save it...

Also when user will click Save the message will be saved but this Input form will not close automatically. User should click Close this dialog (Close document, default text) to close this dialog. This functionality is build in by default for any type of Document Types. Unfortunately i can't find by myself how to do changes which i described with "Save" button and auto closing dialog.

Any advices will be much appreciated.
Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/1/2009 5:12:32 AM
   
RE:Changes in auto-generated form
Hi,

could you please tell us where exactly is the form? Could you please navigate me e.g. on the sample Community site or explain what web part it is?

Best regards,
Helena Grulichova

User avatar
Member
Member
paxer - 10/1/2009 5:34:39 AM
   
RE:Changes in auto-generated form
Hi Helena,

In my case this is custom Document Type "Message board" which is does not exist in Kentico Community Edition, i've create it myself, but this is does not matter for my question.
When you adding "User contribution" web part for any Document Type which is in the system, "User Contribution" web part generate depending from Document Type Fields this kind of form. It will be different depending form number and type of Document Type Fields. But this kind of template ("Save" and "Check Spelling" buttons at the top of form) is auto generating for all of them. And i am looking the way how to change this template and move this buttons to the bottom of all forms. I think it should be one header template somewhere, but i can't find where exactly...

Thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/1/2009 6:36:11 AM
   
RE:Changes in auto-generated form
Hi Paxer,

Thank you for your explanation. It is much clearer now:-)

You could change this file:

<web site folder>\CMSAdminControls\UserContributions\EditForm.ascx


(or better clone it and re-write the declaration in: <web site folder>\CMSAdminControls\UserContributions\ContributionList.ascx)

The code of that panel is:

<asp:Panel runat="server" ID="pnlMenu" CssClass="ContentEditMenu">
<cms:editmenu ID="menuElem" runat="server" ShowProperties="false" RenderScript="false"
ShowDelete="true" ShowSpellCheck="true" ShowCreateAnother="false" />
</asp:Panel>
<input type="hidden" name="saveChanges" id="saveChanges" value="0" />


you may move it to the bottom just before the last </asp:Panel> tag.

Regards the auto-closing: Do you have the edit permission? It does not close the dialog in my tests, only the form changes slightly because of editing mode.

Do you use the 4.1 version?

Best regards,
Helena Grulichova

User avatar
Member
Member
paxer - 10/1/2009 7:02:52 AM
   
RE:Changes in auto-generated form
Hi Helena,

Thanks for replay, i will try this changes tomorrow when i will be closer to source code.
Regarding Auto Close Form - yes it's not closing when you using User Contribution Webpart for Add or Edit new document, and i need to do it. I mean i need to add some code to close it automatically just after user click "Save". Now with your help i know where exactly this form template is located i could try to find out how to do this in code behind.
Yes, we are using 4.1 Kentico Community Edition with all last hot fixes.

Thanks