Thank you, Richard. Where do I put $("#{modal_id}").appendTo(" body");
Could I just put that in the HTML file? Something like... <script> $("#{modal_id}").appendTo(" body"); </script> I tried hardcoding the div_id of my modal into your code, but it didn't work. The database doesn't update properly with the correct foreign key. I also have some date value fields and the calendar.js doesn't pop down so I'm thinking this has something to do with http://linuxapuntes.blogspot.com.ar/2013/03/plugin-modal-bootstrap-web2py.html Do you have an example of where you'd put the appendTo ? On Tuesday, April 28, 2015 at 1:04:57 PM UTC-4, Richard wrote: > > There is different issue when embed for into a bootstrap 2.3.2 (at > least)... One that I found were that <form> tag get ripped off... The other > depend of the way the modal form compoenent is included into the main > form... Depending how the widget is write the extra are embed beside the > original input field which don't work in case of a <form> tag since html > <form> can't be nested... Modal don't offer any convenient support à this > level and you have to manage this by yourself... But it is easy, you just > need to use jquery .appendTo() : > > Like that : $("#{modal_id}").appendTo("body"); > > And extract your component modal form which is nested into the main page > form and append it to the body instead... > > This is basically what jQuery Dialog is doing out of the box which > boostrap modal don't that make the usage of modal with component in web2py > so difficult... > > :) > > Richard > > > On Tue, Apr 28, 2015 at 12:40 PM, LoveWeb2py <atayl...@gmail.com > <javascript:>> wrote: > >> Richard, >> >> This is working great. >> http://linuxapuntes.blogspot.com.ar/2013/03/plugin-modal-bootstrap-web2py.html >> >> I currently use it like this: >> >> def my_controller(): >> from modalplugins Import Modal >> field = db.mytable.field >> modal = Modal(field, ' Add', 'Add area','Area') >> db.mytable.field.comment = modal.create() >> grid=SQLFORM.smartgrid(db.my_other_table) >> formModal = modal.formModal() >> return(grid=grid, formModal=formModal) >> >> The problem I am having now is that I can't process the modal. Do you >> have any thoughts on how to do this? >> >> On Friday, April 17, 2015 at 9:50:15 AM UTC-4, Richard wrote: >>> >>> 'reference tablename' = 1 to many >>> 'list:reference tablename' = "many to many" it denormalised that why I >>> put it between double quotes >>> >>> Richard >>> >>> On Thu, Apr 16, 2015 at 5:13 PM, LoveWeb2py <atayl...@gmail.com> wrote: >>> >>>> Richard, >>>> >>>> I did want to have a foreign key for info_about_field1. I guess I could >>>> do a reference field1 ? >>>> >>>> >>>> >>>> On Thursday, April 16, 2015 at 3:02:51 PM UTC-4, Richard wrote: >>>>> >>>>> There is no relation between both tables... You can embed 2 forms as >>>>> component (LOAD()) >>>>> >>>>> if you were having list:reference type field it is differents and you >>>>> have to question yourself if you are not better to have something like >>>>> SELECT_OR_ADD_OPTION() or even better AutocompleteSelectOrAddOption() >>>>> widget... I recently update my old AutocompleteSelectOrAddOption() >>>>> widget (not finish yet) in order to move from jquery ui dialog to >>>>> bootstrap >>>>> modal... I will publish a web2py slice when done. >>>>> >>>>> Just ask if it interest you I can publish preview here... >>>>> >>>>> Richard >>>>> >>>>> On Thu, Apr 16, 2015 at 2:08 PM, LoveWeb2py <atayl...@gmail.com> >>>>> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> I'd like to have two SQLFORMs right next to each other. >>>>>> >>>>>> The second SQLFORM is just going to be linked to the field in table >>>>>> 1, but will be used so the student can make additional comments about a >>>>>> field. Model will look like this: >>>>>> >>>>>> db.define_table('main_table', >>>>>> Field('field1','string'), >>>>>> Field('field2','string'), >>>>>> migrate=False) >>>>>> >>>>>> db.define_table('second_table', >>>>>> Field('info_about_field1','list:string'), >>>>>> Field('info_about_field2','list:string') >>>>>> migrate=False) >>>>>> >>>>>> My question is... is it possible to have the second_table as a link >>>>>> underneath the main_table field. I want to have a modal pop up so they >>>>>> can >>>>>> enter additional information about the field >>>>>> >>>>>> >>>>>> -- >>>>>> Resources: >>>>>> - http://web2py.com >>>>>> - http://web2py.com/book (Documentation) >>>>>> - http://github.com/web2py/web2py (Source code) >>>>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "web2py-users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to web2py+un...@googlegroups.com. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "web2py-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to web2py+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.