Skip to Content
Menu
This question has been flagged
1097 Views
                    

Hello 

I want to create a lead on the website. I put the customer field as input to enter a part of the customer name to the top of the list so that the user can more easily select the customer.

I want show datalist customer_name but submit the customer_id.

please help me.                          

                                                             
                                                                            
                                                                   

Avatar
Discard
Author

<input list="cusomers" id="cus" name="customer1" class="form-control o_website_form_input" required="1" placeholder='Select a customer' onchange="check_selected_customer()" style="border-radius: 1em;max-height:35px; width:420px;float:center;margin:10px"/>
<datalist id="cusomers" >
<t t-foreach="customers" t-as="customer">
<option t-att-value="customer.id">
<t t-esc="customer.name"/>
</option>
</t>
</datalist>