"Add new item" option beside an Input field in Create form
- Single Page
Posted 11 August 2012 - 08:13 AM
In my form, I have a column where there is a drop down list. Now, i want to add an option beside the drop-down list which says 'Add new item' for adding an item which isnt on the drop-down list. When someone clicks on that link, a new window should open which is another groceryCrud Create page(already designed). When the user submits that page, the window should close and the new item should reflect in the drop-down list now.
I hope i have conveyed my requirement properly.
Any kind of help is appreciated.
Thanks. Cheers.
Posted 01 September 2012 - 10:16 AM
Posted 03 October 2012 - 09:22 AM
Hope it helps ! (I have done something like this for a send by email button from the list - the thing you want is pretty much similar)
Posted 03 October 2012 - 14:16 PM
you could use JS and delegate on the click event to open e popup ( I use lightbox ) in which you can load what you want, and on the success branch of the ajax, use JS to set the returned value in the input you want from the form ...
Hope it helps ! (I have done something like this for a send by email button from the list - the thing you want is pretty much similar)
[/quote]
Thanks a lot for the reply.
Can you please share some sample code with me?
Posted 04 October 2012 - 04:48 AM
Please follow the link./topic/364-answered-set-relation-and-add-new-button-to-quick-insert/#entry1458.
I think it will fullfill your requirements.
Thanks.