Skip to content

Can not access bootstrap methods in scripts #828

@jmdiazlr-sys

Description

@jmdiazlr-sys

I am trying to add a map location selector, with some inline javascript in address-form.tpl, I put the map in a bootstrap modal. I added two buttons to cancel or accept the locations set by user, in the accept button onclick event handler I collect the coordinates, and try to hide the modal with:

var modal = bootstrap.Modal.getInstance(myModalEl);
modal.hide();

but script fails in first line with:

Uncaught ReferenceError: bootstrap is not defined

I tried many comments from google and nothing works. Seems like bootstrap javascript not added to page, but do not know how to confirm not correct this.

PS 9.0.1

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions