Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

UserDefinedForms - Default Form Setup


Reply


2 Posts   1106 Views

Avatar
Double-A-Ron

Community Member, 604 Posts

9 October 2009 at 11:12am

Hi all,

I'm extending UserDefinedForm to create a page type with the following additional behavior:

1. A common default form is setup for the user on page creation. E.G. Firstname, Surname, Email, Address are all setup by default.
2. A new tab to load PDF documents pertaining to the page in PDF format.
3. The OnCompletion page displays links to download the PDF documents in 2.

Basically, people have to enter personal info to download the PDF documents.

I should be able to work out the last two. But does anyone have any starter for create a default form when this new page type is created?

Chur
Aaron

Avatar
Double-A-Ron

Community Member, 604 Posts

14 October 2009 at 4:11pm

Anyone?

When you add a field to a UserDefinedForms, it automatically adds a record to the DB for a new field, although all the options are NULL. (userforms/code/editor/FieldEditor.php function "addfield"). This part is easy.

Then when you save a new form in the CMS, it updates the above record with a who bunch of default settings. These settings must be coming from somewhere.

Basically I need to run this default process manually for each field I need as soon as a user creates a page of this type.

Cheers
Aaron