Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form_complete.js #20

Open
paulsonak opened this issue Sep 13, 2024 · 2 comments
Open

form_complete.js #20

paulsonak opened this issue Sep 13, 2024 · 2 comments

Comments

@paulsonak
Copy link

Hi there,

I am building a new Django app (using jQuery 3.7.1) and hoping to implement some of the widgets you have available for form_complete and a tree view for ontologies.

Specifically, I have included in my .html form in the header:

<script src="{% static 'common/js/form_complete.js' %}" type="text/javascript"></script>

and this is the text input:

<div class "row mt-3">
    <div class="col-6">
        <label for="target_disease" class="form-label small">Target Disease</label>
        <input id="target_disease" name="target_disease" class="bp_form_complete-BAO-uri" type="text">
    </div>
</div>

The error I get is:

Uncaught (in promise) TypeError: jQuery(...).bioportal_autocomplete is not a function
    at HTMLInputElement.<anonymous> (form_complete.js:295:18)
    at Function.each (jquery-3.7.1.min.js:2:3129)
    at e.fn.init.each (jquery-3.7.1.min.js:2:1594)
    at formComplete_setup_functions (form_complete.js:235:46)
    at form_complete.js:100:7

It looks like the form_complete.js tries to work with jQuery 1.X and use the 1.X migrate tool which isn't applicable to migrate to jQuery 3.X.

Is it possible to update the form_complete.js to work with jQuery 3.X?

Thank you!

@jonquet
Copy link

jonquet commented Sep 27, 2024

Hello Amanda, these widgets are not super recent... are you using them to query BioPortal or another instance of OntoPortal .? Maybe @Bilelkihal or @jvendetti in the team can help you.

@paulsonak
Copy link
Author

paulsonak commented Sep 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants