Form not submitting hidden input

There is hidden input in code which must be TRY by default and be changeable using dropdown box. Code: HTML:

<div class="form-group">
            <label class="col-sm-3 control-label">Fiyat</label>
            <div class="col-sm-4 col-md-3 col-lg-2">
                <div class="input-group input-group-sm">
                    <input type="text" placeholder="Fiyat" class="form-control js-listing-price js-numeric" name="price.amount" />
                    <div class="input-group-btn btn-default">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <span class="js-currency-preview">TL</span>
                            <span class="caret"></span>
                        <ul class="dropdown-menu pull-right">
                            <li><a data-value="TRY">TL</a></li>
                            <li><a data-value="USD">$</a></li>
                            <li><a data-value="EUR">€</a></li>
                        <input type="hidden" value="TRY" class="js-listing-price-currency js-currency" name="price.currency">
                </div><!-- /input-group -->


$('.dropdown-menu').on('click', 'li a', function(e) {

All other fields are working except this js-currency field.



As Backbone Binder can't see hidden changes in hidden inputs they mustn't change in page. It can be solved by adding trigger('change'); to the code:



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.