Hi folks,
The view I am currently working on is one which displays information about a single candidate in the database of a recruitment agency. I am using Bootstrap Tabs to separate out the information about the client into different tabs such as Overview, Contact, Files etc etc.
I am looking to dynamically add related information to the view i.e. I have a table for candidate emails and I would like to have a system where on the contact tab I have an ADD button for adding a new email, phone number etc. I would like to use AJAX to both add a new HTML form to the view as well as model validation.
I would like to hear if anyone has attempted this scenario before? Rather than using a traditional CRUD form, I am considering having a system where the controller run by the button click grabs a new ActiveRecord instance of the required model and use Kartik’s GridView with the EDIT option triggered as the view. I am still in the process of working out how to do this and I am not sure yet if this can be done. The other option I would have would be to use a modal to add the new model and when the model is successfully saving, close the modal and reload the current view.
As I said, as this is fairly complex and bespoke, I would interested in hearing if any other developers out there have attempted anything like this.
Thanks in advance.
U4EA