Title: dropdown into input
Last modified: December 21, 2017

---

# dropdown into input

 *  Resolved [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/)
 * Hi.
    I have a simple question. I want to hide a dropdown and show the value in
   an input field. How can I do that? dropdown is fieldset1, and input fieldset2.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802616)
 * Hello,
 * You simply should enter the special class name: hide through the “Add CSS Layout
   Keywords” attribute of the DropDown field, and for the input field use a calculated
   field configured as follows:
 * – Assuming the DropDown field is the fieldname1, the equation of calculated field
   would be: fieldname1
 * – If you want it be an input field, untick the checkbox: “Read Only”
 * and that’s all.
    Best regards.
 *  Thread Starter [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802747)
 * Hi.
    I’m getting the filedname1 id instead of the value in fieldname2
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802755)
 * [@hrvan](https://wordpress.org/support/users/hrvan/),
 * Could you send me the link to the webpage where the form is inserted for checking
   it, please?
 * Best regards.
 *  Thread Starter [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802789)
 * In the fieldname2 I want to show the post_title of the post person comes from.
   
   I’m passing the post_id over the URL with postid=1 for example. I’ve managed 
   to get the name of the post_title in fieldname1 which is dropdown. If I could
   get it inside the input field then I don’t need dropdown. How can I do that?
 *  Thread Starter [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802791)
 * I have it locally on my laptop still
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802809)
 * Hello [@hrvan](https://wordpress.org/support/users/hrvan/),
 * I don’t know how your form was implemented without check it, however, if you 
   have a DropDown field in the form, I will call it fieldname1 but the fields’ 
   names are generated dynamically, and you want fill an input field with the choice
   selected in the DropDown field, the easier solution would be use a calculated
   field as the input field whose equation would be simply:
 * fieldname1
 * and that’s all.
    Best regards.
 *  Thread Starter [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802843)
 * so what I did was for dropdown (fieldname1) i’m using dropdown ds, and populate
   it with post_title from table {wpdb.posts}. In the page where I have a form I’m
   using:
    [CP_CALCULATED_FIELDS_VAR name=”postid”] ` <SCRIPT> cpcff_default={1:{}};
   cpcff_default[1]['fieldname1']=postid; In the url I've added ?postid=1 to get
   the post id. And this works in the dropdown. I want to hide this dropdown with
   css, and show it's value in the input (or calculated field) fieldname2. With 
   only fieldname1 I'm actually getting 1 as value. </SCRIPT>
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802866)
 * Hello,
 * I guess it is happening because the values of choices in the DropDown field are
   the posts’ ids, if you want to use the text of the choice selected the equation
   associated to the calculated field would be:
 *     ```
       (function(){
       var tmp = fieldname1;
       return jQuery('[id*="fieldname'+'1_"] option:selected').text();
       })()
       ```
   
 * I’m sorry, but I cannot give you a more precise support without checking your
   form. Please, upload your website to an online server.
 * Best regards.
 *  Thread Starter [Goran](https://wordpress.org/support/users/hrvan/)
 * (@hrvan)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802898)
 * Hello.
 * Thank you. This is working.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘dropdown into input’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [input](https://wordpress.org/support/topic-tag/input/)

 * 9 replies
 * 2 participants
 * Last reply from: [Goran](https://wordpress.org/support/users/hrvan/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/dropdown-into-input/#post-9802898)
 * Status: resolved