add('receiver', 'text', [ 'label' => 'Recipient', ]); $this->add('msg', 'textarea', [ 'label' => 'Message', 'attr' => [ 'oninput' => 'countCharacters(this.value)', 'id' => 'smsMsg', ], ])->add('character_count', 'static', [ 'label' => false, 'default_value' => 'Character(s) 0/918 (English), 0 SMS message(s)', 'attr' => [ 'id' => 'character_count', 'style' => 'font-size: smaller;padding: 0 0 0 5px;margin-top: -35px;', ] ]); // $this->add('sms_sender_id', 'select', [ // 'choices' => SmsSender::all()->pluck('name', 'id')->toArray(), // 'attr' => ['class' => 'select2 pmd-select2 form-control'], // 'label' => 'Sender', // 'empty_value' => trans('core::core.empty_select') // ]); $this->add('lead_id', 'manyToOne', [ 'search_route' => route('leads.leads.index', ['mode' => 'modal']), 'relation' => 'lead', 'relation_field' => 'full_name', 'model' => $this->model, 'attr' => ['class' => 'form-control manyToOne'], 'label' => trans('core::core.form.lead_id'), 'empty_value' => trans('core::core.empty_select') ]); $this->add('contact_id', 'manyToOne', [ 'search_route' => route('contacts.contacts.index', ['mode' => 'modal']), 'relation' => 'contact', 'relation_field' => 'full_name', 'model' => $this->model, 'attr' => ['class' => 'form-control manyToOne'], 'label' => trans('core::core.form.contact_id'), 'empty_value' => trans('core::core.empty_select') ]); $this->add('submit', 'submit', [ 'label' => trans('core::core.form.save'), 'attr' => ['class' => 'btn btn-primary m-t-15 waves-effect'] ]); } }