-->
Welcome, Guest
Username: Password: Remember me

TOPIC: trying to create a simple module for customer form

trying to create a simple module for customer form 2 months 1 week ago #36581

  • rao0070
  • rao0070's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 1
  • Karma: 0
hi, im trying to create a simple form for customer to checkin while he visits the store.
trying to see if i can build a module which displays basic form data for customer to fill in
like
1)customer name
2)address
3)email
4)phone
5)referall details etc?

can someone help me understand where to start to create a module (form) to collect the details and how to make the data available for later ERP actions like creating a ticket / orders for the same customer.?
any quick help would be much appreciated or advice details on where / how to start this .
Attachments:
The administrator has disabled public write access.

trying to create a simple module for customer form 1 month 3 weeks ago #36757

  • delcroip
  • delcroip's Avatar
  • OFFLINE
  • Expert
  • Posts: 126
  • Thank you received: 26
  • Karma: 9
hi,

for such simple usage check the module builder,

for more complexe module I'd rather build the pages from database github.com/delcroip/dolibarr_page_from_SQLtable
and take only the folder structure from the module builder github.com/Dolibarr/dolibarr/tree/develo...dulebuilder/template

br
The administrator has disabled public write access.

trying to create a simple module for customer form 1 month 2 weeks ago #36783

  • stkdm
  • stkdm's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 1
  • Karma: 0
Hello delcroip,

I'm new in Dolibarr and I find your module very interessing.

What's the best pratice to use it?
The administrator has disabled public write access.

trying to create a simple module for customer form 1 month 2 weeks ago #36835

  • delcroip
  • delcroip's Avatar
  • OFFLINE
  • Expert
  • Posts: 126
  • Thank you received: 26
  • Karma: 9
Hello,

First create the database table with any sql tool or simply by creating the sql file in the sql folder of the module and then activate the module it will run the sql file therefore create your new tables
then copy the "create fromtable" in the dev folder of dolibarr and execute the php from command with the table name as param.

finally change the php file generated :
- mymodule should be replace with your module name
- remove the out. prefix
- copy the files in your module folder (including the libs and ajax handler files)
- correct the error fo the generqted file (it will have some

I still need to improve the script to create the test class and to create business/visualation classes to have a cleaner code but current output helped me a lot
The administrator has disabled public write access.
The following user(s) said Thank You: stkdm
Time to create page: 0.121 seconds