How to create custom form

Hi All,

How to create custom form in custom module and get form data saved in some DB table on form submission?

What will be general flow?

I have blocks created in custom module which is calling functions from index.php referring db table sys_page_compose (Func column)

Any specific module I can refer to get proper working code flow?

Plz help me out if any one have any idea. Its for Dolphin 7.0.0

Quote · 30 Dec 2009

Getting form submitted in a custom module and populating DB, any one have any idea about the general flow?

Quote · 4 Jan 2010

At first, this is more complicated as you may think.

Maybe this informations could help:

  1. Every field has a field type. You have to extend the checking field type functions
  2. Then you have to extend your DB with the wanted columns. ( Field in form = Column in DB )
  3. Use the form generaton function in dolphin and extend it

Do you have more detailed infos, so we can help you better?

Best regards

ecKREATIV

Quote · 4 Jan 2010

Thanks ecKREATIV for the reply, now there is a ray of hope for me Smile

Well speaking about details, I have managed to create my own demo module referring ‘NEWS’ module. I can see my modules two blocked index page properly along with top menu tab for it (on module installation by Admin).

Both blocks have some text messages.

Now I want to create a form on one of the block, containing some fields say text fields and I will submit it to populate the DB (my own table, already created)

Indeed it is complicated, but if I can create a basic form and manage to populate DB on its submission I can try complex forms later.



For time being we can try with a form with say 2-3 fields and validations. Hope this clears the picture a bit.

Quote · 5 Jan 2010

Hi there

I have managed to create form by passing array to BxTemplFormView object ($aForm =  '....form array...'; $oForm = new BxTemplFormView($aForm);        return $oForm->getCode(); )

Now the big question is how to submit it after applying validations and get data stored in DB.

Quote · 6 Jan 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.