Title: Sample Code for Custom Forms?
Last modified: June 1, 2018

---

# Sample Code for Custom Forms?

 *  [owyheeadmin](https://wordpress.org/support/users/owyheeadmin/)
 * (@owyheeadmin)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/sample-code-for-custom-forms/)
 * Love your plugin. I wanted to add a few fields to my form.
 * Questions:
 * – (most important) Any sample code to help with method / action? I get the fields
   in there, but the form doesn’t submit (of course). But action isn’t clear to 
   then get that data into the DB.
    – (least important) I’d like to add state / 
   city drop downs. Enter your state then city is populated based on your state 
   selection. Any examples of this?
 * I’m just not sure the boundaries of the custom form – I think HTML. Can’t drop
   JS in there, etc.
 * Thanks much. Again, love the plugin! Delightful.
 * Bec

Viewing 1 replies (of 1 total)

 *  Plugin Author [Icegram](https://wordpress.org/support/users/icegram/)
 * (@icegram)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/sample-code-for-custom-forms/#post-10348960)
 * [@owyheeadmin](https://wordpress.org/support/users/owyheeadmin/),
 * Here are the sample custom form code look like
 *     ```
       <form method="post" action="/action_page.php">
         First name:<br>
         <input type="text" name="firstname" value="Mickey">
         <br>
         Last name:<br>
         <input type="text" name="lastname" value="Mouse">
         <br><br>
         <input type="submit" value="Submit">
       </form> 
       ```
   
 * So method will be post and action will be “action_page.php”.
    You have to handle
   data to save in DB will be written in PHP. Regarding select box you have to write
   extra field in the form. And yes, you can not add js in Rainmaker custom form.
 * Hope this helps you.

Viewing 1 replies (of 1 total)

The topic ‘Sample Code for Custom Forms?’ is closed to new replies.

 * ![](https://ps.w.org/icegram-rainmaker/assets/icon-256x256.png?rev=1386289)
 * [Icegram Collect - Easy Form, Lead Collection and Subscription plugin](https://wordpress.org/plugins/icegram-rainmaker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/icegram-rainmaker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/icegram-rainmaker/)
 * [Active Topics](https://wordpress.org/support/plugin/icegram-rainmaker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/icegram-rainmaker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/icegram-rainmaker/reviews/)

## Tags

 * [custom form](https://wordpress.org/support/topic-tag/custom-form/)

 * 1 reply
 * 2 participants
 * Last reply from: [Icegram](https://wordpress.org/support/users/icegram/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/sample-code-for-custom-forms/#post-10348960)
 * Status: not resolved