Follow these steps to add a simple registration page to your website:
- Create a table
- Create a Data Project
- Add a page (type = table)
- Set Allow Insert? to Only
- Copy the shortcode of the registration page
- Paste the shortcode into your web page
A registration page allows users to add a row to your registration table. The registration can be updated until the user leaves the registration page. After closing the page, the data is no longer retrievable for public users. To administer registrations, you need to create an additional CRUD page.
IMPORTANT Please notice that tab Manage Table Options is no longer available. Table Options was renamed to Project Templates and can now be accessed directly from the plugin menu.
Here is the create table script for the demo table
CREATE TABLE `registration`
(`id` int(10) NOT NULL auto_increment
,`firstname` varchar(100) NOT NULL
,`lastname` varchar(100) NOT NULL
,`gender` enum('','Female','Male')
,`birthdate` date NULL
,`address` varchar(100) NULL
,`zipcode` varchar(100) NULL
,`city` varchar(100) NULL
,`state` varchar(100) NULL
,`country` varchar(100) NULL
,`email` varchar(100) NOT NULL
,`phone` varchar(10) NOT NULL
,`message` text NULL
,`interest` set('','Sports','Music','Art')
,PRIMARY KEY (`id`)
)
I need to know if I can do conditional formatting with this. For example. I need to gather a companies Industry sector (good or services). based on that answer, I need to focus a second drop down box to further segment the business. Is this possible.? I need to take this conditional formatting down 3 levels.
Hi David,
From what I understand from your question, I think you can do this with the plugin. However, by default, each drop down list on a form is an individual item on its own. You’ll need to add your own logic to connect them to each other. There are two ways to do this. You need to have programming skills in PHP and JavaScript for both.
Alternative 1:
Use filter wpda_after_simple_form to add your own javascript events to your drop down lists. More information about this hook can be found here:
https://wpdataaccess.com/docs/filters/wpda_after_simple_form/
Alternative 2:
Create your own PHP class which extends plugin class WPDA_Simple_Form and add your own logic to that class. Make sure WP Data Access is loaded before your code is executed, which is needed to assure the availability of class WPDA_Simple_Form. It might be an idea to have a look at class plugin WPDA_Publisher_Form. Data Tables is implemented as an subclass of class WPDA_Simple_Form as well, and it uses its own JavaScript code to add functionality as well. This is comparable to your situation.
Hope this helps! 🙂
Best regards,
Peter
Hello !
I want to make a form just like this but with an input type blob and when put the shortcode in the frontend , this one dont act like an upload file input but just like varchar input . how can i fix this problem ?
Hi Yani,
The plugin has no upload feature. Sorry!
Maybe you can send me your use case and requirements? And I’ll see what I can do. Please use the contactform to send you informationin private.
Best regards,
Peter
Hello,
In that case of registration page, is it possible to synchronise with the WP user registration system, so when a new user is add to this table, this user is add to WP User table ?
Hi François,
No, it’s not possible to sync this registration form to WP’s user registration system.
Let us know if you have more questions.
One thing very important to me its upload documents. Is not possible with this database manager?
You can upload documents to your WordPress media library. For security reasons, this only works for registered users, as unregistered users have no access to your media library.