No video

How to Save Elementor Form Data to Your Database

  Рет қаралды 85,793

Tony Teaches Tech

Tony Teaches Tech

3 жыл бұрын

Learn how to save Elementor form data to a database in this step-by-step tutorial that walks you through the process of inserting user data into MySQL from PHP.
Get Elementor Pro to enable all features including webhooks 👉 ttt.do/Element... (affiliate link)
Code snippets and more at tonyteaches.te...
Check out my vlog channel ‪@TonyFlorida‬
#elementor #wordpress #formsapi

Пікірлер: 251
@maurysur81
@maurysur81 3 жыл бұрын
Excellent Tony, you`re an excellent teacher. I understood your tutorial and I don`t talk english daily. Greetings from Argentina. GENIO!!!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Awesome, thank you! 😀
@jamesshumatejr9391
@jamesshumatejr9391 2 жыл бұрын
I am an old programmer (oracle DBA for DOTNET) from 10 years ago. I am trying to create a prayer list in our church's website. This was SO CLEAR even a programmer could understand. I hope you have lessons on how to display the data. I will add a statue field and based on that display current prayer requests and add a counter. I have been looking for the HOW TO and love it. James 6 thumbs up
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks James! I have a similar video that goes through a basic CRUD implementation which I think you'll find helpful too kzfaq.info/get/bejne/ptWJo6-fvrXUY5s.html
@stefano94103
@stefano94103 3 жыл бұрын
This is one of the best tutorials for using Elementor forms and adding it to the database. Thank you for your hard work creating this video.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're very welcome!
@paraboy2183
@paraboy2183 3 жыл бұрын
Searching for this a long time ago
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Great, glad you found me
@TopicZBoerse
@TopicZBoerse Жыл бұрын
Hello Tony. Thanks a lot for the Video! You say "everytime a form is submitted", what if i got many forms with different inputs for different databases. How can I get the input for the right Form? For example: FormX: Name(PK), Email, Message --> Database Demo FormY: Age, Country, Name(FK) --> Database Customer
@michaelbollowskanal3942
@michaelbollowskanal3942 Жыл бұрын
great video, I see a lot clearer now how to manage my custom made websites. You have a great teaching style, I like that a lot
@otrejot
@otrejot 3 жыл бұрын
Thanks so much for this!! This solves many problems at my freelancing gigs.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Happy to help!
@sam-hf8yc
@sam-hf8yc Жыл бұрын
Keep up the good work, Tony!😆
@xmamba7444
@xmamba7444 3 жыл бұрын
this helped so much tony, appreciate it brotha! made it so simple for anyone to be able to use.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Awesome to hear that :)
@Aron97a
@Aron97a 3 жыл бұрын
After long search here on yt tutorials, finally one that explained it that simple and nice. Thanks!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Awesome! I'm happy to hear that David
@jaymccormick8385
@jaymccormick8385 2 жыл бұрын
Thanks! Was also wondering if since you’ve custom coded that submit event - that if, say, you wanted to also send an email AND REDIRECT user if you would have to also accomplish that in the same code block - I presume so - or can one add multiple actions after submit ? Is there any “run code” option available through the interface directly - it seemed you had to leave the reservation and custom code the event in the child theme as your only custom option. All good if so - just curious
@shoshishoshi127
@shoshishoshi127 3 жыл бұрын
This one is exactly what I need! Thanks for the tutorial.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad I could help!
@tommygunn2782
@tommygunn2782 Жыл бұрын
Excellent tutorial - thanks very much!!
@HarshKumar-ws3wv
@HarshKumar-ws3wv 3 жыл бұрын
Wonderful!......you solved many people's problem...thank you
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
That's fantastic :)
@andybw6542
@andybw6542 Жыл бұрын
Tony Many thanks for sharing your knowledge with us all - this video certainly helped me to understand the complexities with WP, Elementor and MYSQL. As a non-developer I have a question if I may. I like the idea of adding data from forms to MySQL data Tables (defiantly will help with analysis) my question is how I adjust the php code to allow data form a single input form to be saved to several data tables i.e. a client sign up form that will save data to the following data tables - client_info, address_details etc I have been able to do this with HTML, CSS and PHP but am struggeling with doing the same whilst using Elementor Forms All said this was a great video and looking forward to watch all you have to offer - great job
@vaughanthomas2994
@vaughanthomas2994 Жыл бұрын
Thanks for this Tony, it's helped me out a lot, however, I want to add a photo upload to the form. So I added another column to my database called 'photo' and added a line in the functions.php - 'photo' => $fields['photo'], but when I submit the form it displays '0' in the photo column. How is it really done? Cheers.
@HiLectric
@HiLectric 3 жыл бұрын
This video was really helpful. Thanks so much for putting this together.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sure thing!
@Richard_GIS
@Richard_GIS 2 жыл бұрын
I really like the mood and setup of your desk, interesting lightning and camera angel
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks Richard
@rodezweb1978
@rodezweb1978 3 жыл бұрын
will this only work with one form? i have multiple forms on wbsite i need to store data in diffrent tables
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Please see my comment here for working with multiple forms tonyteaches.tech/save-form-data-elementor/#comment-602
@chrislee7704
@chrislee7704 3 жыл бұрын
Great vid! Couple q's about the data: 1) where would that data be hosted and how could you make sure that you are the sole owner and only person with access to the data? 2) how could you connect the data base to scripts that would run calculation on each new database entry and markup a pdf to send back to user? Thanks!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
1. The data is hosted in a table in the same database as your WordPress site. If you own this, then you also own the Elementor data. 2. This is possible, but would require you to hire a developer to write a custom solution. I'm not aware of an existing solution for this
@chrislee7704
@chrislee7704 3 жыл бұрын
@@TonyTeachesTech thanks!
@PanagiotisTheofilopoulos
@PanagiotisTheofilopoulos 5 ай бұрын
Hi Tony! Thank you for this tutorial, it was very helpful for me too! How can I display those submissions (saved in the database) in the front-end with Elementor Pro? I have created a guestbook with Elementor Form and I want to dynamically display those submissions saved in the DB. Also, if I remove a submission I think it still exists on the DB. Thank you in advance.
@user-lq7gh7xl4q
@user-lq7gh7xl4q Ай бұрын
ty bro u so good 😀
@Thegamershow
@Thegamershow 3 жыл бұрын
Using this method, how can you do this for multiple forms on your website and put the data into their own separate tables? (Example: Form1 > Form1Table and Form2 > Form2Table) Thank you for creating this video!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This code snippet will show you how to do that tonyteaches.tech/save-form-data-elementor/#multiple-forms
@wenlongkc
@wenlongkc Ай бұрын
Could I check if it is possible to save data to database using Forminator or Contact Form 7?
@JeanMaireTV
@JeanMaireTV 3 жыл бұрын
Awesome tutorial, very helpful and simple steps to follow
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it was helpful!
@kemekenneth
@kemekenneth 3 жыл бұрын
Good one Tony. If you don't want to touch theme editor files, you can also choose webhook as your after submit action. Provide a php file url, the file would accept the post request and insert the data into your db.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Good to know that!
@kemekenneth
@kemekenneth 3 жыл бұрын
@@TonyTeachesTech thanks for commenting here. I watched your other video where you processed "addition" and returned the sum to an HTML. My question to that is, how do I pass that returned data to Email action? Something tells me the mail fires before that data arrived. Any direction would be appreciated. Thanks
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@kemekenneth Oh okay I understand. That I don't know the answer to unfortunately
@kemekenneth
@kemekenneth 3 жыл бұрын
Thanks @@TonyTeachesTech, I'll keep poking and looking around.
@razahaider3069
@razahaider3069 10 ай бұрын
How?
@wuxianzhe6571
@wuxianzhe6571 4 ай бұрын
May I ask how can I get the submission ID in elementor pro form hook? like in elementor_pro/forms/new_record?
@TakieddinMohamad
@TakieddinMohamad Ай бұрын
Hello Tony, is it possible to send data of Form in mean time to email address in addition to external Database, thanks a lot in advance
@creativemousestudio
@creativemousestudio 2 жыл бұрын
This is a great tutorial! However, I notice you omitted adding a unique ID (primary key) for the new table. Wouldn't you want to be able to associate the table with other data in the database and therefore would need to have a primary and foreign key for each record? Also, I'm trying to understand what the use case would be for doing this since Elementor records all its submissions in the e_submissions and the e_submissions_values tables. Couldn't I just learn how to work with these tables instead of creating a new table for my form submissions?
@missulu
@missulu Жыл бұрын
Usually the primary also uses auto-advance, it will apply the next number in +1 order. You don't have to do anything. If I understand your question...
@duyduongduyduong
@duyduongduyduong 2 жыл бұрын
thanks for share. hope will have searies how to show in backend wordpress to see all infomation after submit in elementor form!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@Lennings82
@Lennings82 2 жыл бұрын
Is it possible to have a query that pre fill a field? It looks like the field can have one. Like I want have the looged in user telefon number pre fill into a field.
@razuahammad55
@razuahammad55 5 ай бұрын
Thanks... and is it possible to prevent duplicate submission? please
@clairelaw7034
@clairelaw7034 3 жыл бұрын
It works for me! Thanks for the tutorial
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome!
@wearejungians
@wearejungians Жыл бұрын
How could I collect forms from visitors on my site and then add a search feature so users can search for the data for those filled out forms? For example, I am working on a site where customers can come and input a negative review of XYZ place and I want the data to be sent to a database which then people can search for XYZ place on the homepage and see what negative reviews that place has. Any advice, Tony?
@RianHidayat-kd4uv
@RianHidayat-kd4uv Жыл бұрын
hi, how to set login page as we enter the website? I want to make web portal using elementor. but getting stopped out because of the flow. in PHP we set login page and move it in the beginning of folder htdocs and named it index.php but how to showed it in elementor? how does we set first page in elementor is login page before it redirect to dasboard after login of course, and how to connect users and password database in phpmyadmin to match in login page? thanks
@shivamparashar3846
@shivamparashar3846 3 жыл бұрын
Thank you so much for this wonderful video
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You are so welcome!
@pinogatto3540
@pinogatto3540 2 жыл бұрын
how does this work for only a certain page? if I adde to the functions, will this not run for every form?
@anthonyenamu1430
@anthonyenamu1430 2 жыл бұрын
thanks for the video, it was very helpful. I would like to know how then can we retrieve those values in the database to an excel fle or better yet how can we display all the entries in our website??
@shotsi673
@shotsi673 2 жыл бұрын
Are there any validation tools in the Elementor form? And how do you usefully extract the data from the PHPAdmin environment?
@intelligenceWin
@intelligenceWin Жыл бұрын
Hey Tony Is it possible to do the same with formulator Forms? Like if I create a form on forminator, so will I be able to save that form data to a custom table in myphpadmin.
@ankitbishnoi4067
@ankitbishnoi4067 2 жыл бұрын
Excellent work buddy......
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thank you! Cheers!
@simon1885
@simon1885 3 ай бұрын
how to do same thing but with checkboxes and selects? please i need it for school project
@rstantonreid
@rstantonreid Ай бұрын
very clear but i dont see how the function is linked to the specific form...or put another way how the specific form calls the specific function
@apupatra123
@apupatra123 10 ай бұрын
Hi Tony can you provied a tutorial video about how to upload image or document and save to a folder with PHP MySQL data base
@muhammadkhan3345
@muhammadkhan3345 8 ай бұрын
Can I collect from multiple websites using this way?
@paramaribo5978
@paramaribo5978 3 жыл бұрын
is there a way to show the data on your browser in a frond-end layout before writing to the DB.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes you can achieve this with custom HTML/PHP, but it requires some coding and design to show the data to the user before submitting it to the db
@claudiofuentes9880
@claudiofuentes9880 2 жыл бұрын
@@TonyTeachesTech easy way wp data tables plugin, im working on this right now, what tony shares plus data tables to show and manage the data.
@hillaryaura7244
@hillaryaura7244 3 жыл бұрын
i dont know when you will answer this Tony but i would wish to know.if i installed wordpress locally on my machine ,and installed xampp on my machine,would the code snippet you provide work?i would wish to create a form with my own fields maybe to store my shop inventory.otherwise thank alot for the light.i appreciate this tutorial
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I don't fully understand your setup with xampp (not familiar with that). If xampp give you PHP functionality, then I could see this working.
@wanstudiodigital1906
@wanstudiodigital1906 3 жыл бұрын
finally i found it.. this is exaaactly what I'm looking for.. Hey Tony, i'd be great if you complete it with tutorial to show the table on the page using elementor.. thanks anyway
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Perhaps this longer, more-comprehensive tutorial will bring things full circle for you kzfaq.info/get/bejne/ptWJo6-fvrXUY5s.html
@dbltecnologia4713
@dbltecnologia4713 3 жыл бұрын
Thank you very much!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome
@ociredef33
@ociredef33 3 жыл бұрын
Is possible create more forms with each their own table? In your code where is the "link" of the Elementor's form? 'elementor_pro/forms/new_record'? But in the example the form's name is 'New Form'.......
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi Federico. You can certainly have multiple forms. Distinguish between them with their 'id' on the server like this: if ( 'MY_FORM_NAME' == $form_name ) { // do something } else if ( 'MY_OTHER_FORM' == $form_name ) { // do something else } .... developers.elementor.com/forms-api/#Form_New_Record_Action
@jhonendergarcia6170
@jhonendergarcia6170 2 жыл бұрын
Hi, Tony. I did everything you did, But the data is stored in table `wp_e_submissions_values` instead of my own table. What am I doing wrong?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I'm not sure without seeing your code
@faithfulservant1380
@faithfulservant1380 2 жыл бұрын
Does this work with code snippets? My child theme did not have a functions.php, so I followed the instructions for code snippets but it did not work. Any help is appreciated
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I think all themes should have functions.php. This will not work with code snippets alone
@irenacohen3564
@irenacohen3564 2 жыл бұрын
is it possible to save the data from elementor form to external database?
@erickaltamiranosarzuri8976
@erickaltamiranosarzuri8976 3 жыл бұрын
Do you have and example .. when you display on screen the same table in elementor form for me
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
What do you mean?
@dwiantorosk
@dwiantorosk 2 жыл бұрын
Hi tony. Can you make a video how to using this elementor forms to connect with webhook?
@septianardiwijaya3927
@septianardiwijaya3927 2 жыл бұрын
very good bro do you have the to show that data in some page?
@mohamedelhar9899
@mohamedelhar9899 2 жыл бұрын
i use exactly the same staps , doesn't for me and i don't know why can i get some help plz
@dimokokilala8950
@dimokokilala8950 Жыл бұрын
Hi Tony! Thank you for this video! How do I update a field in the usermeta? For example I want to update the Facebook URL using my customized Elementor page. Thank you in advance!
@yeahboi7119
@yeahboi7119 2 жыл бұрын
hi tony, its a really good tutorial can you make a tutorial how to create registration and login using elementor and save the data we have collect into database? thank you.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Something I can look into
@babakkashefi
@babakkashefi 2 жыл бұрын
hi tony tnx about this amaze video, how i can create a page that when someone type in search box on that page, many fields shows information from database that I before imported to database, query information and show , for example you search "tony" name in search box, then show information's from tony - like age, family, job and so... pls help me by share link or something like that tnx again man keep it on... i want do this all in wordpress by elementor
@boatbiekeane5049
@boatbiekeane5049 3 жыл бұрын
Hi Tony, This is a very good Tutorial Please teach me how to upload files from Elementor form to a folder and show them into dashboard.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Something I can possible look into for a future video
@ZANZICTSOLUTIONS2
@ZANZICTSOLUTIONS2 2 жыл бұрын
thank u tony but when ineen do do some thing calculation ?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
What?
@julialopez8814
@julialopez8814 3 жыл бұрын
HI, this was very useful, thanks a lot. I was wondering whether I can just go to appearance/customize/additional css and add the code there or is it better to install the child theme?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
That's a good question. I don't think one way is better than the other. If you have the child theme installed, I guess I would suggest there in case the main theme for some reason removes your custom CSS during an update or something.
@creativemousestudio
@creativemousestudio 2 жыл бұрын
It is always better to install a child theme. Otherwise, any customization you do at the parent theme level will be overwritten when there is an update.
@KetutAryadana
@KetutAryadana 3 жыл бұрын
Hi Tony, really great tutorial! Do you know how to read data from a custom table (like your demo table), and display it on a page? Thank you.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
To read data you would use the wpdb class as we did in this video, but call the get_row function. Please refer to the WordPress developer documentation here developer.wordpress.org/reference/classes/wpdb/#select-a-row To return the data, see what I do in this tutorial here kzfaq.info/get/bejne/g8qeZcp31MrUqWQ.html&t=997 (I recommend you watch the whole thing) To display it on a page, watch the linked tutorial in its entirety and that should do it.
@babakkashefi
@babakkashefi 2 жыл бұрын
this is my question bro
@kenmelitado7952
@kenmelitado7952 3 жыл бұрын
This video is a gem. glad I found it. anyway, using the same method, can you also delete data from the database? if so, how?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You can log into your database on the command line and execute raw SQL commands to delete individual rows. Also, if you have something like phpMyAdmin installed, you can do this through a web browser kzfaq.info/get/bejne/mdiWdM1q3sfdZas.html
@kenmelitado7952
@kenmelitado7952 3 жыл бұрын
@@TonyTeachesTech okay, thanks! do you also happen to know what would be the directory 'elementor_pro/forms/new_record' for WPForms? or is this method not usuable with WPForms?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@kenmelitado7952 Sorry Ken, I'm not familiar with WPForms
@webimonpro
@webimonpro 2 жыл бұрын
Hey, there!! Thanks for making this tutorial. But, when I paste it on my function.php then it is showing this error: "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP."
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
I'm not sure what's going on here 🤔
@vahidgoudini4754
@vahidgoudini4754 Жыл бұрын
Hello Tony, Tanx for all data, if use multiple form, Should we write that code in the continuation of the first code? I would be grateful if you record a video 📽📽📽📽📽📽📽📽
@mizuzuzu5215
@mizuzuzu5215 Жыл бұрын
And how about if i want to show data on my wordpress page?
@kimramireztv
@kimramireztv 2 жыл бұрын
Hi Tony! This is a great tutorial. Is these items possible to do in Elementor forms?: - Populating drop-down menus with data from database - Updating data using Elementor forms Thank you!!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Yes. It will require custom code
@jorgeamaya3342
@jorgeamaya3342 3 жыл бұрын
Hi Tony, your tutorial has been very good, you gave me a solution that I was looking for. however, suppose that the $ fields (message) has three options, separated by three Fields in the form, field A, field C, field D, how would you make the array 👉 $ wpdb-> insert ('table', array (' name '=> $ fields [' name '],' email '=> $ fields [' email '],' message '=> $ fields [' $ fieldA, $ fieldB, $ fieldC '])); is that correct? remember that my question is if three fields of the form separated by comma "," could go in the message field !!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I'm not sure if that's correct. I would suggest testing it out. Sorry if that's not too helpful
@victorzamora9316
@victorzamora9316 3 жыл бұрын
Excellent tutorial, how do I do it if I want to read a row from the table and perform an update, then showing the result in an attached list.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Maybe something like the would help kzfaq.info/get/bejne/ptWJo6-fvrXUY5s.html
@yvesstevehatsindimana8788
@yvesstevehatsindimana8788 3 ай бұрын
Hello sir thanks for this vidéo but is not work on mine I don't know why.
@agumon7116
@agumon7116 2 жыл бұрын
Thx Sir
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Welcome
@komalramzan920
@komalramzan920 Жыл бұрын
Hello sir great tutorial helped me alot but I am trying something to validate the data that is existing in DB. please help me out in this I'm trying to verify the file number whether it exist in Database or not if it exists it give success message, if not then show invalid number. My Tab has only one col i.e fileNumber. This is the code I have tried to put in the child theme in functions.php. when I enter the file number in the name field this code only show the statement after else statement ($ajax_handler->add_error( $field['id'], 'Invalid number' );). is there any other way to do this? here is the code add_action( 'elementor_pro/forms/validation', function ( $record, $ajax_handler ) { $fields = $record->get_field( ['id' => 'name1',] ); if ( empty( $fields ) ) { echo "enter the file number"; } $field = current( $fields ); global $wpdb; if($wpdb->connect_error){ echo 'Connection Failed: '; } $sql = $wpdb->get_results( "select fileNumber from wpbd_FileNumbers where fileNumber like '%$field%'"); /* $sql="select * from $wpdb->wp_FileNumbers where fileNumber like '%$field%'";*/ if($sql == $field){ $ajax_handler->add_response_data( true, $output ); } else $ajax_handler->add_error( $field['id'], 'Invalid number' ); }, 10, 2);
@nomanshahid667
@nomanshahid667 3 жыл бұрын
What are those 10 and 2 at the end in the code snippet you entered in the functions.php file?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Great question! It's the priority and number of arguments respectively developer.wordpress.org/reference/functions/add_action/
@angeliapratiwiruruk4776
@angeliapratiwiruruk4776 3 жыл бұрын
can it only be used for child elementor themes or can it be with the Medicalpress theme? thankyou
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
This will work wether you have a child theme installed or not, but I highly recommend installing a child theme. Otherwise when you edit functions.php, you’ll find lots of other code in that file. This goes for other themes like Medicalpress. If there is a child theme for Medicalpress, use that. If not, this will still work, but just be careful when editing functions.php. Please note that this only applies to Elementor Pro. PS: I saw you comment on the blog post too :)
@zuhairjaved1772
@zuhairjaved1772 3 жыл бұрын
Hello, do you know what directory this would change to if I use ninja forms instead of elementor forms, >> " 'elementor_pro/forms/new_record',"
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sorry I'm not familiar ninja forms
@antelokas3743
@antelokas3743 3 жыл бұрын
Hello, great video, Any idea how to prevent form clearing data after Submit? I'm looking for this option, not sure should it be done through javascript...
@antelokas3743
@antelokas3743 3 жыл бұрын
Solved with following 2 lines (if anyone got also stucked) : jQuery( document ).on('submit_success', function(event, response){ document.getElementById("answer").innerHTML = response.data['1'].result; var old_value = $("#form-field-a").val(); $("#form-field-a").attr("value", old_value).val("").focus().blur(); }); Let me know if this aproach is good, thx ;)
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Seems like you answered your own question 😁
@GauravSrivastv
@GauravSrivastv 2 жыл бұрын
Thanks, Tony for very useful tips. I'm looking for a method to create a unique id containing text + number like ORD001. How can I achieve this in elementor form? This id should be automatically increased as the user fills the form. Can you please help me with that?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
In your PHP code, if you already have a number, then you can do something like: $old_num = 1; $new_num = $old_num + 1; $length = 3; $id = "ORD".str_pad($new_num, $length, "0", STR_PAD_LEFT);
@GauravSrivastv
@GauravSrivastv 2 жыл бұрын
@@TonyTeachesTech Thanks so much!
@dewjagai2928
@dewjagai2928 3 жыл бұрын
can you write this same data to the brouwser with the same procedure, not first to the db than back to browser but drectly to the brouwser
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sure. That's possible with a GET or POST request
@brunomotta26
@brunomotta26 Жыл бұрын
Olá Tony, poderia ilustrar como poderia ser feito usando um id para cada tabela ? ex, form1: quero que ele grave na tabela demo1, form2: quero que ele salve na tabela form2
@brunomotta26
@brunomotta26 Жыл бұрын
// form elementor add_action( 'elementor_pro/forms/new_record', function( $record, $ajax_handler ) { $raw_fields = $record->get( 'fields' ); $fields = []; foreach ( $raw_fields as $id => $field ) { $fields[ $id ] = $field['value']; } // form 1 global $wpdb; $output['success'] = $wpdb->insert('form1', array( 'nome' => $fields['nome'], 'email' => $fields['email'], 'ddd' => $fields['ddd'],'telefone' => $fields['telefone'], 'ddd2' => $fields['ddd2'], 'telefone2' => $fields['telefone2'])); // form 2 global $wpdb; $output['success'] = $wpdb->insert('form2', array( 'nome' => $fields['nome'], 'email' => $fields['email'], 'ddd' => $fields['ddd'],'telefone' => $fields['telefone'], 'ddd2' => $fields['ddd2'], 'telefone2' => $fields['telefone2'])); // form 3 global $wpdb; $output['success'] = $wpdb->insert('form3', array( 'nome' => $fields['nome'], 'email' => $fields['email'], 'ddd' => $fields['ddd'],'telefone' => $fields['telefone'], 'ddd2' => $fields['ddd2'], 'telefone2' => $fields['telefone2'])); $ajax_handler->add_response_data( true, $output ); }, 10, 2); como usar com esse código ? add_action ( 'elementor_pro/forms/new_record' , function ( $record, $ajax_handler ) { if ( 'MEU_FORM' == $form_name ) { // lógica para MY_FORM ... } else if ( 'MY_OTHER_FORM' == $form_name ) { // lógica para MY_OTHER_FORM ... } ... } , 10 , 2 )
@HiLectric
@HiLectric 3 жыл бұрын
Putting this out for anyone to chime in, but does anyone know how in wordpress or elementor to get the data that was submitted to pop up on the page as a confirmation for the user to see what they had just sent after they hit submit button?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You can perhaps use JavaScript's alert() function to do this www.w3schools.com/jsref/met_win_alert.asp
@eatravels
@eatravels 3 жыл бұрын
hi tony its a good videa, would like to is there any limitation on adding number of record, and how to retrieve
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
At some point, there will be a limit, but I'm not sure what that is
@renataqb
@renataqb 3 жыл бұрын
Hello, can this be customised for EA registration forms... Actually, cannot find a solution to save in db the terms and conditions acceptance for a registration form made with EA. Thank you.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sorry, what is EA?
@renataqb
@renataqb 3 жыл бұрын
@@TonyTeachesTech Essential addons for elementor
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@renataqb Oh okay. Sorry... I'm not familiar with that
@ken16310
@ken16310 3 жыл бұрын
love it! thanks
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome!
@elmarzougui
@elmarzougui 3 жыл бұрын
great vedio
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks!
@perstinmoringstare4980
@perstinmoringstare4980 Жыл бұрын
how to save data useing contact from 7 in my phpmyadmin wordpress
@paraboy2183
@paraboy2183 3 жыл бұрын
Thank man for the help....
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sure thing!!
@Error40499s
@Error40499s 8 ай бұрын
How to save that a custom post type?
@usdirectories6468
@usdirectories6468 3 жыл бұрын
Do you have a explainer video that shows us how to build a database from form fields of a registration page. Step by step on a WP website.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
The closest thing I have is this CRUD tutorial kzfaq.info/get/bejne/ac-jl8ZyqsDToWQ.html
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sorry, this video is specific to WordPress and Elementor kzfaq.info/get/bejne/ptWJo6-fvrXUY5s.html
@raycrews8797
@raycrews8797 2 жыл бұрын
Tony can you do a video on how to put Elementor Multi Step form data into PHPmyadmin? There is no video on Elementor Multi Step Form data into PHPmyadmin.
@vedat_orkun
@vedat_orkun 3 жыл бұрын
Well, can we send the same form data to the mail at the end of this process?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes, just make sure to add the Mail "Actions after submit"
@bangwahid4067
@bangwahid4067 2 жыл бұрын
hello tony, thank you for the tutorial you made very useful, can I make the same tutorial as the material from this video in my language (indonesia)? , I think a lot of my country needs it, I'm going to include this video link in the description that this is your content I'm just recycling
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Go ahead!
@deliverydash7781
@deliverydash7781 3 жыл бұрын
How can i add the form data to be displayed on another page like a thank you page?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Perhaps a redirect with GET parameters in the URL will do that for you
@carlosmurillosaenz1640
@carlosmurillosaenz1640 3 жыл бұрын
Hi, Tony, i have a cuestion, i need to see, whats your program new_record.php has in side, in path elementor_pro/forms/new_record, can you help me please!. i follow you but, not work for me. thanks for you help.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi Carlos, have you looked at the blog post for this video? tonyteaches.tech/save-form-data-elementor/ It has the content from the video that you can take a look at and copy/paste if you need to
@carlosmurillosaenz1640
@carlosmurillosaenz1640 3 жыл бұрын
@@TonyTeachesTech Thanks, Tony, have a good nigth.
@claudiofuentes9880
@claudiofuentes9880 3 жыл бұрын
So cool!! thanks!! so much!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You are so welcome!
@claudiofuentes9880
@claudiofuentes9880 2 жыл бұрын
@@TonyTeachesTech Maybe you dont need more extra money, but a suggestion you should have a donate button. The invitation is that if we sell someting with your tutorials we should donate, i woud do it. Really nice tutotial.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
@@claudiofuentes9880 Thank you very much Claudio. Perhaps in the future I can do something like that, but for now if you subscribe and share my videos, that is all I ask!
@TheDannypapish
@TheDannypapish 3 жыл бұрын
Hey Tony thanks for the tutorial. I did everything, but for some reason it doesn't work for me. I'm not getting any error messages, the information simply doesn't go into the table I created and it stays blank. I use the standard myPhp admin of goDaddy. Also, I don't have "functions.php" on my admin, I have header.php, footer.php, index.php and sidebar.php. I tried to put the snippet in header.php and index.php, and none of them worked. Suggestions?
@TheDannypapish
@TheDannypapish 3 жыл бұрын
*Update* - I found functions.php and copied the snippet there, but still doesn't work :(
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You should have and will need to put the code in functions.php. Are you in the right place?
@alvhen9655
@alvhen9655 Жыл бұрын
@@TonyTeachesTech the same here not working. I placed the code under functions.php, no error but the data not stored in phpmyadmin. Does it work for Free host of wordpres?im just using free hosting.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
@@alvhen9655 You will need Elementor Pro for webhooks to work
@Walterpaige
@Walterpaige Жыл бұрын
@@TonyTeachesTech Tony I just found your tutorial and it's exactly what I was looking for however just like above it's not working. I do have Elementor Pro, and am putting the code into the functions.php on the child theme. The submit button returns success however no data shows up in the table of the DataBase.
@aquilaack2221
@aquilaack2221 3 жыл бұрын
Wow. this is exactly what I need! Is it also possible to Modify database entries with this method? maybe using $wpdb->update() or something? Can you please briefly explain it? thanks a lot!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
In a couple weeks, I'll have a video about creating, reading, updating, and deleting database entries with Elementor, so please stay tuned for that!
@aquilaack2221
@aquilaack2221 3 жыл бұрын
@@TonyTeachesTech that would be amazing! thank you!
@HarshKumar-ws3wv
@HarshKumar-ws3wv 3 жыл бұрын
I have also subscribed !
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you very much for your support 🙏
@mohammeddanishreza4902
@mohammeddanishreza4902 3 жыл бұрын
It was really a nice video.But I have a doubt that if I have an endpoint where i need to send my form data .Where do i need to mention my endpoint url?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
With the $wpdb object, you can access the database that WordPress uses and simply create another table for your Elementor form data
@mohammeddanishreza4902
@mohammeddanishreza4902 3 жыл бұрын
@@TonyTeachesTech Thank you for your response.But I am not using Wordpress database. I have seperate database I have Url of it. I want my form to send those details to my database as soon as I click submit button. I have url (endpoint) of my database. Where should I mention that Url to connect my form with my database.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
@@mohammeddanishreza4902 You can instantiate a database object for your database like this $mydb = new wpdb( 'username', 'password', 'my_database', 'localhost' );
@mohammeddanishreza4902
@mohammeddanishreza4902 3 жыл бұрын
@@TonyTeachesTech But I am not using wordpress database.My database is somewhere else and I have only URL of it to connect my form and retreive data from Form and store it to that particular URL.
@mohammeddanishreza4902
@mohammeddanishreza4902 3 жыл бұрын
@@TonyTeachesTech and where should I write the code of database instantiate .
Wordpress vs coding - why devs SHOULD learn Wordpress
11:03
SuperSimpleDev
Рет қаралды 295 М.
Google Pixel 9 Pro XL is pushing the limits... (Durability Test)
7:12
JerryRigEverything
Рет қаралды 1,1 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 15 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 10 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 36 МЛН
The Biggest Mistake Beginners Make When Web Scraping
10:21
John Watson Rooney
Рет қаралды 109 М.
Save HTML Form Data to a MySQL Database using PHP
24:38
Dave Hollingworth
Рет қаралды 196 М.
Save WPForms Entries to Database | View & Display Entries in WordPress for FREE
12:16
Maker Brews - WordPress & Software Tutorials
Рет қаралды 30 М.
Custom Database Queries in WordPress | WordPress Tutorials
24:39
Joshua Herbison
Рет қаралды 64 М.
How to Deliver a Wordpress Website to a Client in 8 steps
21:10
Rino de Boer
Рет қаралды 387 М.
13 Things To Remove From Your Website Immediately
12:33
Orbit Media Studios
Рет қаралды 304 М.
Google Pixel 9/Pro/Fold Impressions: They've Finally Done It?
13:25
Marques Brownlee
Рет қаралды 4,6 МЛН
WPForms Lite 2023 | Save Entries, Style it, reCaptcha & more
19:20
Matt - WPress Doctor
Рет қаралды 26 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 16 МЛН