EasyUI Forum
May 09, 2024, 02:34:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug?: Combobox Values not submitted  (Read 12376 times)
mike
Newbie
*
Posts: 3


View Profile
« on: September 08, 2014, 08:45:31 AM »

Hello,
i´ve got a problem since upating easyui to v1.4.

I´ve got a form with textboxes an two comboboxes. If I write a text to the combobox which is not in the <options> the value is not submitted with the form. With v1.34 it works properly.

Is there a workaround?

Thanks

 mike


Code:
save entry:
 $('#fm_etb').form('submit',{
                url: url,
                onSubmit: function(){
                       // return $(this).form('validate');
                },
                success: function(result){
                        var result = eval('('+result+')');
                        if (result.success){
                                $('#dlg_etb').dialog('close');                // close the dialog
                                $('#dg_etb').datagrid('reload');        // reload the user data
                        } else {
                                alert ('Fehler');
                                $.messager.show({
                                        title: 'Fehler',
                                     
                                        msg: result.msg
                                });
                        }
                }
        });

And heres the html:
Code:
<div id="dlg" class="easyui-dialog" style="width:500px;height:600px;padding:10px 20px"
                closed="true" buttons="#dlg-buttons">

        <form id="fm" method="post" novalidate>
          <div class="fitem">
                <label>Erfasser:</label>
            <input name="erfasser" disabled="true">
            </div>

            <div class="fitem">
                <label>von:</label>
                <input id="cc" class="easyui-combobox" name="von" data-options="valueField:'von',textField:'von',url:'etb_get_von.php'" required="true" missingMessage="Bitte den Absender der Nachricht angeben!">   
            </div>

            <div class="fitem">
                <label>an:</label>
                <input id="cc2" class="easyui-combobox" name="an" data-options="valueField:'an',textField:'an',url:'etb_get_an.php'" required="true" missingMessage="Bitte den Empfänger der Nachricht angeben!">
            </div>
           
            <div class="fitem">
                 <label>&uumlber</label>
                 <input id="cc3" class="easyui-combobox" name="ueber" data-options="valueField:'ueber',textField:'ueber',url:'etb_get_ueber.php'">
            </div>

<div class="fitem">
                <label>Meldung:</label>
                <textarea name="meldung" class="easyui-validatebox" required="true" cols="40" rows="10" missingMessage="Bitte den Nachrichteninhalt angeben!"></textarea>
</div>

<div class="fitem">
                <label>Maßnahmen:</label>
                <textarea name="massnahmen" class="easyui-validatebox" cols="40" rows="10"></textarea>
</div>
       </form>
</div>

<div id="dlg-buttons">
        <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveEntry()">Eintrag speichern</a>
        <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">Abbrechen</a>
</div>
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: September 08, 2014, 04:55:17 PM »

If I write a text to the combobox which is not in the <options> the value is not submitted with the form

Could you please explain how you write text to the combobox?
Logged
mike
Newbie
*
Posts: 3


View Profile
« Reply #2 on: September 09, 2014, 12:03:30 AM »

Hi,
the user should be able to select predefiened Values or write a new one in the combobox.

From the documentation:
The combobox display a editable text box and drop-down list, from which the user can select one or multiple values. The user can type text directly into the top of list, or select one or more of present values from the list.

Greets & Thanks
Mike
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: September 09, 2014, 12:21:22 AM »

The user can type text directly into the top of list. The top of list means the textbox component. The user can enter text into the textbox but can not make the entered text become one of the list items except that you write some code to achieve this functionality.
When enter some text and press ENTER key, the combobox will search and select what item you hovered or selected. If no item selected, the entered text will be cleared because the entered text does not match any items in the list.
Logged
mike
Newbie
*
Posts: 3


View Profile
« Reply #4 on: September 09, 2014, 02:00:52 AM »

Ah ok, thanks a lot. Wink
 I´ve only wondered - because it has worked in 1.34.

Anyway thanks - btw: Thanks for this great Framework!

Mike
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!