Results 1 to 18 of 18

Thread: Contao 4 Extension - Simple CRUD application

  1. #1
    User
    Join Date
    02-05-19.
    Posts
    66

    Frage Contao 4 Extension - Simple CRUD application

    How could I start building a simple Resource Library (Images, Videos etc.) extension using Contao 4?
    Front end - individual member logged in, add details and upload resources, edit, delete, view details.
    Back end - admin user do the same as front end member.

  2. #2
    User
    Join Date
    02-05-19.
    Posts
    66

    Default How to integrate PHP file into Contao 4 module?

    Could you please tell me how can I integrate a PHP file in Contao 4 module and add data into the table?

  3. #3
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    Please provide more detail about what you want to do - or what the purpose of your application is exactly.

  4. #4
    User
    Join Date
    02-05-19.
    Posts
    66

    Beitrag

    Quote Originally Posted by Spooky View Post
    Please provide more detail about what you want to do - or what the purpose of your application is exactly.
    Its a simple user entry form with article entry form such as Title, Description, File upload. Once submit the data will be stored in database. This is it. I think it is understandable. Thank you.

  5. #5
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    This is something you can do without any additional coding via the form generator. You simply have to create a suitable table in your database and save the form input into that table (there is a setting for that in the form generator).

    This does not provide you with back end listing however. If you want back end listing, you could use the terminal42/contao-leads extension.

    This does not provide you with a front end listing or front end editing however. If you want front end listing and front end editing, you could try the Contao MetaModels extension.

  6. #6
    User
    Join Date
    02-05-19.
    Posts
    66

    Frage

    Quote Originally Posted by Spooky View Post
    This is something you can do without any additional coding via the form generator. You simply have to create a suitable table in your database and save the form input into that table (there is a setting for that in the form generator).

    This does not provide you with back end listing however. If you want back end listing, you could use the terminal42/contao-leads extension.

    This does not provide you with a front end listing or front end editing however. If you want front end listing and front end editing, you could try the Contao MetaModels extension.
    How do I get the form input fields? Can I style the form? How do I map the form fields with the table fields? Please help.

    Apart from this, can I create separate PHP CRUD application in a different folder and integrate the folder with Contao 4. Where do I save the files? How do I get the login member id from my custom PHP pages? I am waiting for the help.

  7. #7
    User
    Join Date
    02-05-19.
    Posts
    66

    Frage

    I have created an external PHP page and put it inside \project\web\ folder and trying to login as registered member user. But the password is not accepting the sha1 encryption process. How do I overcome this? Any sort of help would be great.

  8. #8
    User
    Join Date
    02-05-19.
    Posts
    66

    Default Contao form building extension

    Is there any Contao Extension that can help to build form with option of file uploading? Also data should be saved in database when submit button is clicked.

  9. #9
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    As already said, this is already possible with the form generator of Contao.

    There is one extension that can help you: https://github.com/fritzmg/contao-store-uuid
    This automatically transforms file uploads to UUIDs for the database storage when needed.
    Last edited by Spooky; 03/20/2019 at 15:09.

  10. #10
    User
    Join Date
    02-05-19.
    Posts
    66

    Ausrufezeichen Contao Store UUID Extension

    Thank you Spooky.

    Could you please highlight me on below issues please?
    1. Can I customize from the admin panel?
    2. How do I map the form with the database?
    3. Just let me know how do I proceed.

  11. #11
    User
    Join Date
    02-05-19.
    Posts
    66

    Frage Form data is not saving in the table

    I have designed a form and mapped a table with that. I am submitting the button, but data is not saved in the table. What are the configuration rules that I need to follow?

  12. #12
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    Hm, this should work. Are there no errors?

  13. #13
    User
    Join Date
    02-05-19.
    Posts
    66

    Frage

    Quote Originally Posted by Spooky View Post
    Hm, this should work. Are there no errors?
    Could you please tell me how the table fields are mapped with the form generator fields? How do I get the login user id and save it in the table? Any good idea would be great. If possible try to make it earliest. Thank you.

  14. #14
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    Quote Originally Posted by alahiri View Post
    Could you please tell me how the table fields are mapped with the form generator fields?
    Via the fieldnames.


    Quote Originally Posted by alahiri View Post
    How do I get the login user id and save it in the table?
    The "cheap" solution would be to create a hidden input field and fill it with the {{user::id}} insert tag. A more robust way would be to use a Form Hook.

  15. #15
    User
    Join Date
    02-05-19.
    Posts
    66

    Default Still not working +

    Quote Originally Posted by Spooky View Post
    Via the fieldnames.


    The "cheap" solution would be to create a hidden input field and fill it with the {{user::id}} insert tag. A more robust way would be to use a Form Hook.
    I have done the same exactly.
    Put the {{user::id}} tag in member id as hidden field.
    There is an auto generated field id, I do not do anything for that.

    How could I use current system date and time? I wish to carry it in hidden fields.
    But still its not working.
    Where I may wrong?
    Is there any other related settings available?

  16. #16
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    331

    Default

    Quote Originally Posted by alahiri View Post
    How could I use current system date and time? I wish to carry it in hidden fields.
    You could use the {{date::*}} insert tag for that. Or you could create a "TIMESTAMP" field in the database with
    Code:
    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP

  17. #17
    User
    Join Date
    02-05-19.
    Posts
    66

    Beitrag

    Quote Originally Posted by Spooky View Post
    You could use the {{date::*}} insert tag for that. Or you could create a "TIMESTAMP" field in the database with
    Code:
    TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
    Its now working in my local computer.
    But the same is not working in live server.
    Any guess and suggestion. Am I need to do anything from the backend?

  18. #18
    User
    Join Date
    02-05-19.
    Posts
    66

    Default

    Quote Originally Posted by alahiri View Post
    Its now working in my local computer.
    But the same is not working in live server.
    Any guess and suggestion. Am I need to do anything from the backend?
    Problem resolved now. Its wroking now. I can insert record into the tables.

    Now I wish to display the data and then edit the data. How do I make it? How do I write sql query in PHP and retrieve the record for display? Where do I save my PHP files and how do I acces the database? Please help me on an earliest basis.

    Please give me some clue on how do I start developing Extension on Contao 4.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •