nitinjohnson

i have put an if and else condition so only the fields will be loaded only once so if the user clicks on the edit button for the first time the field values will be blank and if he is editing it then the values will be already there.

To put is simple for the multiselect chosen i have used hidden input fields i am storing its value on the change event of the select so they are not having names

and it isn't getting duplicated due to the if else condition

jlrdw
jlrdw
6 months ago (252,680 XP)

I think you are putting to much into one thing. Just deal with new people in a separate form and controller method and editing in another. Just makes for easier troubleshooting and cleaner code. Just my 2 cents.

nitinjohnson

@jlrdw i will try that out

jlrdw
jlrdw
6 months ago (252,680 XP)

Of course make sure all works without ajax as well for starters, could be a problem elsewhere.

nitinjohnson

ok thanks

dingani-masikondo-mataranyika

In your model did you include the field_name among the protected $fillable array items?

Please sign in or create an account to participate in this conversation.