Working with DB - how to add an additional field (Unique code generator in PHP) to the "Contact form object"?
Autor: Valeriy Khalif
Visitado 1506,
Followers 1,
Compartido 0
There was a need to use the "Contact Form" to fill out the "Questionnaire" and therefore it is necessary to mark each Questionnaire with a "unique code". This code should be visible to the client and then it should be used in DB processing.
How to add an additional field (Unique Unique Code Generator in PHP) to the "Contact Form Object"?
You can add to the "Contact Form" - "field" with the ability to add the "HTML code" or "variable", which can be connected with php.
Publicado en
Hello Valeriy
The X5 is not a DB tool.
With the contact form you can create enrties in a table.
You could manually specify one of the fields to be unique.
Example : You only want one record with the same email. Then you specify the email field as unique.
But you cannot in the form show information from existing records.
In the contact form you fill out all the fields - and then the information is saved in one record when "send" is pressed.
If you want to have a unique identifier in the table, then you could manually add a new field. This new field should be a numeric field with automatic increment. But again - you cannot show this to the user as it is only created at the time the record is created.
Maybe if you could tell some more of what is the purpose with this, then we could suggest a solution.
Autor
Yes, I agree with you, X5 is not a DB tool!
OK. If the user himself wants to do this and share with the rest of the X5 user using the WebSite X5 Marketplace, Additional objects. Why do not you make your project open and accessible for additional development. It’s always easier to check the code for bugs and publish.
OK. So far, all this has to be done using third-party software products and inserted into your project as an additional module. This will greatly complicate the rapid modification of your project. It’s also problematic to work with CSS styles. You give very little explanation of how to work with the "HTML-code" object and work with the pages, tab - Expert, CSS-code.
Hello Valeriy
You could use a database tool like AppGini : https://bigprof.com/appgini/
With this you can create a database in a few hours. You can have user-groups and for each group you can set priviligees for tables : Who is allowed to create records, edit records, view records and delete records - and also for anonymous users ( not logged in ).
You can see an example here : http://bramminginfo.dk/oversigt.html
The example ( without the clickable links with opening of named windows ) can be made, generated and uploaded in less than one hour.
Nearly almost in the example is with functions given automatic by the software.
As you can see it can easily be integrated in a X5 project via iframes. It could also have been made via a link.
If you want to work with databases ( Mysql) then the AppGini is amongst the quickest ways to make a functioning solution. It is quick to learn, easy to use and the price is very fair. If you want to make very sophisticated solutions, and you do not want to make additional code yourself, then you maybe need some other software that will cost 10 - 20 times as much as the AppGini.
Take a look at the demo project : https://bigprof.com/demo/index.php
As far as I know, then there is no special code made in this project - this is what the software can generate automatically from the specifications made in the project.