Skip to content
Snippets Groups Projects
class.dynamic_forms.php 32.6 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jared Hancock's avatar
    Jared Hancock committed
                    onselect: function(item) {
    
                        $('input#<?php echo $this->name; ?>').val(item['value'])
    
                        $('input#<?php echo $this->name; ?>_id').val(item['id'])
    
    Jared Hancock's avatar
    Jared Hancock committed
                    }
                });
            });
            </script>
            </span>
            <?php
        }
    
    
        function getValue() {
            $data = $this->field->getSource();
            // Search for HTML form name first
            if (isset($data[$this->name.'_id']))
                return (int) $data[$this->name.'_id'];
            return parent::getValue();
        }
    
    
        function getEnteredValue() {
            // Used to verify typeahead fields
            return parent::getValue();
        }