full custom form
-
Hi i am using my own form , and this is the log to the console : Please check your collection and document name in the [realtime] shortcode! ! Can i have a full exemple with html form plese ?
-
Hi @boris2020, which version of the plugin are you using?
You can find the example by inspecting the form on this page.
https://wordpress.dalenguyen.me/save-data-to-realtime-database/
<form action="/save-data-to-realtime-database/#wpcf7-f38-p39-o1" method="post" class="wpcf7-form" novalidate="novalidate" id="if-create-data-form" > <input type="hidden" name="collectionName" value="users" /> <input type="hidden" name="databaseType" value="realtime" /> <input type="hidden" name="arrayType" value="hobbies,food" /> <p> <span class="wpcf7-form-control-wrap firstName" ><input type="text" name="firstName" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="First Name" style="cursor: auto;" /></span ><br /> <span class="wpcf7-form-control-wrap lastName" ><input type="text" name="lastName" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Last Name" /></span ><br /> <span class="wpcf7-form-control-wrap email" ><input type="text" name="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Email" /></span ><br /> <span class="wpcf7-form-control-wrap phone" ><input type="tel" name="phone" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-tel" aria-invalid="false" placeholder="+1 647 620 0000" /></span> </p> <p> <label for="age">Age</label><br /> <span class="wpcf7-form-control-wrap age" ><input type="number" name="age" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" id="age" min="1" max="100" aria-invalid="false" /></span> </p> <p> <label for="dateOfBirth">Date of Birth</label><br /> <span class="wpcf7-form-control-wrap dateOfBirth" ><input type="date" name="dateOfBirth" value="" class="wpcf7-form-control wpcf7-date wpcf7-validates-as-required wpcf7-validates-as-date" id="dateOfBirth" aria-required="true" aria-invalid="false" /></span> </p> <p> <label for="hobbies">Hobbies</label><br /> <span class="wpcf7-form-control-wrap hobbies" ><select name="hobbies[]" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" id="hobbies" aria-required="true" aria-invalid="false" multiple="multiple" ><option value="Archery">Archery</option ><option value="Slap Dance">Slap Dance</option ><option value="Rock Climbing">Rock Climbing</option></select ></span > </p> <p> <label for="food">Food</label><br /> <span class="wpcf7-form-control-wrap food" ><span class="wpcf7-form-control wpcf7-checkbox" id="food" ><span class="wpcf7-list-item first" ><input type="checkbox" name="food[]" value="Pho" /><span class="wpcf7-list-item-label" >Pho</span ></span ><span class="wpcf7-list-item" ><input type="checkbox" name="food[]" value="Ramen" /><span class="wpcf7-list-item-label" >Ramen</span ></span ><span class="wpcf7-list-item last" ><input type="checkbox" name="food[]" value="Dimsum" /><span class="wpcf7-list-item-label" >Dimsum</span ></span ></span ></span > </p> <p> <label for="gender">Gender</label><br /> <span class="wpcf7-form-control-wrap gender" ><span class="wpcf7-form-control wpcf7-radio" id="gender" ><span class="wpcf7-list-item first" ><input type="radio" name="gender" value="Male" checked="checked" /><span class="wpcf7-list-item-label">Male</span></span ><span class="wpcf7-list-item" ><input type="radio" name="gender" value="Female" /><span class="wpcf7-list-item-label" >Female</span ></span ><span class="wpcf7-list-item last" ><input type="radio" name="gender" value="Other" /><span class="wpcf7-list-item-label" >Other</span ></span ></span ></span > </p> <p> <input type="submit" value="Submit" class="wpcf7-form-control wpcf7-submit" id="if-data-submit" /> </p> </form>
hi @hanthuy,
Thank for your response.
My extension version is 0.6.1.this is my own custom form :
<html>
<body>
<form action=”” method=”POST”>
<table>
<tr><td color=”red”>Code d’inscription:</td><td><input type=”text” name=”code”></td></tr>
<tr><td>Nom:</td> <td><input type=”text” name=”nom”></td></tr>
<tr><td>Prenom:</td><td><input type=”text” name=”prenom”></td></tr>
<tr><td>Tel :</td><td><input type=”text” name=”tel”></td></tr>
<tr><td>E-mail:</td><td> <input type=”text” name=”email”></td></tr>
<tr><td colspan=”2″ align=”center” color=”black”><input type=”submit” value=”Validez votre inscription”></td></tr>
</table>
</form>
</body>
</html>i have create the “users” collection to my firebase project !
I want to know how to send data without using any “form” generator plugin.
I am working on localhost.
Thank you very musch.- This reply was modified 4 years, 5 months ago by boris2020.
Hi @boris2020, the id in form is important, you should add it.
<form action=”” method=”POST” id="if-create-data-form">
And check the docs for more detail: https://firebase-wordpress-docs.readthedocs.io/en/latest/database/save-data-realtime-firestore.html
Hello,
I am trying to make a form where my users can update there character name and about info from the site.
How do I configure which form fields update which childkeys in the database? The user guide does not explain this.
Dale, please help!
I am trying to make the contact form 7 for users to manage their firebase realtime data in WordPress. This is an example of my firebase data:
Users
Ybnjdjdjdndnddjdndjs(firebase uid)
Name: …….
About: ……
profile_pic: (url)
background_pic: (url)
city: …….
country: ……
gender: …….I need the form to only update the information that is changed when a user clicks submit, so how do I make each feild to a specific node so that it doesn’t erase the other nodes?
Please help.
https://wikacy.com/create-character
https://wikacy.com/your-app-character
- The topic ‘full custom form’ is closed to new replies.