⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. Very soon this forum will be read-only and archived. ⚠


"Add new item" option beside an Input field in Create form

add new item input

  • Please log in to reply
4 replies to this topic

#1 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 11 August 2012 - 08:13 AM

I want to modify the Create Form.

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.

#2 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 01 September 2012 - 10:16 AM

guys please reply

#3 crina

crina

    Member

  • Members
  • PipPip
  • 17 posts

Posted 03 October 2012 - 09:22 AM

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)

#4 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 03 October 2012 - 02: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)


Thanks a lot for the reply.
Can you please share some sample code with me?

#5 tofayelahmed

tofayelahmed

    Advanced Member

  • Members
  • PipPipPip
  • 63 posts

Posted 04 October 2012 - 04:48 AM

Hello r00tkiit .
Please follow the link.http://www.grocerycr...sert/#entry1458.
I think it will fullfill your requirements.
Thanks.





Also tagged with one or more of these keywords: add, new item, input

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users