I want to build a multitenant SaaS application in PHP with Laravel 5.4. I have prepared for almost every module that is required for architecture but now I am struck with Automated Custom Fields Generation.
Like we customize forms in SAP, Oracle eBiz Suit, Sage CRM, Salesforce etc. I want to create a schema like this. So if any user/company requires a custom field or field-set, I don't have to re-write the code. The fields should be added like drag-and-drop feature.
I don't know if this technology has a specific term... But I require some guidance and tutorials on architecture of this module.
Thanks for your help!
You can do it by modifying the database.
Let's assume your original database structure is like this.
Then, you modify the database by adding two tables, one for creating the structure of the custom field, the other for adding the value of the corresponding transaction data.
After that, the image below can be achieved by take into account the relationship between the field of the table. I put the same color for the fields that related to each other.
The rest, I assume you already know how to do it in Laravel.
If you would like to have Laravel drag-and-drop, custom form generator similar to a CRM, wufoo, surveymonkey, google forms, formstack, etc... then I recommend:
Create your Laravel application and add the authentication: php artisan make:auth
Integrate the Form Builder component using a javascript library such as jQuery Form Builder
Create a table for forms that has a foriegn key for user. Store the form layout in JSON as a field in your table.
Create a table for submissions that has a foreign key to the form. Store the form submissions in JSON as a field in your table.
View the laravel package example on Github Laravel Drag and Drop Form Builder
Related
I'm having difficulties implementing some of the features my client would like to have.
We're building a shopware shop, which is almost done. I've developed some plugins and customizations to have the shop fit my client, but I'm not the best at backend development using ExtJS and Doctrine.
The situation is: The shop sells car parts. We've bought a third-party plugin that allows us to enter ktype numbers for each product, so that the client can search for his/her car in the frontend and get all fitting products.
The plugin has it's own window in the backend, which isn't very comfortable.
So I created an extra tab in the article details, which displays all entries from the database using the third-party model.
That wasn't so hard since the model and database were created by the third-party plugin and I just had to query the data and display it.
What I'm trying to accomplish is: I added an extra column (selected) with a checkbox, where the admin can choose the cars the article fits to.
The plan was to read the textfield "ktypes" of the article on load, check all corresponding checkboxes and then when a checkbox is altered just save the new ktypes array to the article.
Problem is, that this way I can't sort by that column since it's not in the ExtJS store/model.
So now I'm thinking I'll create my own Model with all the columns from the third-party model, add a article_id column and a selected column and reference everything there.
What I don't know is: How to I get the contents of the third-party model into my own database?
The third-party plugin doesn't reference the article. The table only holds all car data imported from a csv list. The reference between an article and the data is just a textfield in the article details.
I thought about Doctrine associations, but I don't really have a reference point or foreign key...
Has anyone got an idea how to solve this?
Can share code if that helps...
Thanks!
I went in a different direction but still need help. Will post a new question though since it's a different topic.
Thanks for trying to help!
I'm new to Moodle and there is a new project in my office that I want to do.
What I want to do is to create a plugin that helps you create forms. For example, if I want to create a simple register form within Moodle or a simple questions form, the plugin must be able to manage the different type of labels (mail, text, drop-down, select, check, etc.), store the form in a database (form1, form2) and create the table for the respective form.
How should I approach this? Is this possible in Moodle? Or do I just code it in another language and make a generator? Maybe a local plugin?
Thanks in advance.
There is something similar in Moosh although I haven't tried it myself.
http://moosh-online.com/commands/
moosh generate-form form_name
It is possible. There is at least one existing form builder plugin for Moodle that could serve you as a good inspiration source:
repo: https://github.com/WisdmLabs/moodle-local_edwiserform
docs: https://edwiser.org/forms/edwiser-forms-documentation
Can anyone please guide me how to create a custom field (search filter) on joomla.
I want to create a custom filter from which i can select any particular table to search items in that table. Kindly refer to the screenshot i have attached.
I am a beginner to joomla & PHP.
I want to incorporate the search in the core joomla smart search or if there is any problem with that than i dont have any problem in having a dedicated page on the site.
I have 8-9 tables with 5-6K records for which i want to search the data. User will search some keywords and filter it with the table name present in mysql database. Search will use that particular table selected. Only particular users having access to that page will be using that search. At most 2-3 people will be having access to search.
What i am concerned is about the process of creating a custom field with drop down field of table in mysql DB. I tried searching but i didn't got any specific information. I have the knowledge on OOP methodologies but not much on MVC. Kindly suggest.
What you want to do can be done but will require a functional understanding of both OOP methodologies and MVC principles.
You can create a custom field to generate the drop down field of tables to search.
The next part depends on how you want to incorporate the feature into your website. Do you want it to be part of the core Joomla search or have a dedicated view for it.
Another major programming obstacle is how to generate the table search queries in a way that doesn't require you to build out complicated and difficult to maintain query generation code for each table. Otherwise any tables not explicitly codes for would not be part of search until you updated code.
I would edit your question with following information:
where and how will user search
does search need to list all tables and search all
Is this something you want to expose to the public, or a tool for Admins.
I am working on creating a Joomla based web service that is easy to use. The end goal is to allow customers the ability to manage the site from the front-end with no back-end (administrator) access. To accomplish this task I am using K2 that has existing front-end editing. Then behind the scenes we will provide technical support. Essentially, non-techy customers can easily manage their site, with us managing the tech side of things.
I need to provide a few forms (Contact, Event registration/payment and Donation payment). These forms also require that certain aspects of the forms can be updated via the front-end leveraging K2. (eg. The email address to send form submissions to.) With most forms components this can be done easily from the admin panel, however this is too complicated for non-techy customers and means we would have to provide admin access instead of just front-end. Not a good solution.
I have created a K2 contact Form plugin that will allow a customer to update where the email is sent on submission, when logged into the front-end with correct permissions. So far so good. I chose a plugin to accomplish this so we could leverage the existing front-end editing.
The issue I ran into is how to make my plugin create a table, preferably on install, as well as save form data to that table on successful submission. I'm not sure that this is possible using a plugin and have not found any documentation or sources mentioning how to accomplish this task.
I was hoping someone may be able to confirm either way if this is possible? Any suggestions, comments, etc would be greatly appreciated.
While installing plugin you can create DB tables, Its not a big deal create the SQL file with proper table query and set that inside your XML file.
Also you can create a forms(with many fields) inside your plugin file, But the problem is you should have any components controller and model related to this form submission task. Bcoz form submission you cannot handle inside plugin file, it should required a controller and model files.
So basically your plugin have related components then you can achieve it with form action like below.
<form action="index.php?option=com_yourcomponent&task=your_controller.your_function">
For creating DB table while installing plugin check this link
Hope its helps..
Here in my PHP application, I need to allow users to create a registration forms customized for themselves. They will be having the privilege of choosing the number fields, their names as well as there type. The table for the data also will be created dynamically in MySQL.
Now I want to know if there is any library out there which could lessen my work or will I have to do it the harder way?
Thanks.
Yo can try CROOGO dynamics forms a CakePHP CMS.
It is having a very good plugin where admin can customize it's form with validation facility and also relate two fields if required (eg: Password and confirm password should be same.
For core php. You to structure your db by using SAAS model.
refrence:http://stackoverflow.com/questions/5180803/what-kind-of-database-is-used-in-dynamic-form-builder