Field auto completion on v4

Questions related to using nuBuilder Forte with other APIs or software components.

Field auto completion on v4

Postby marcvander » Mon May 07, 2018 6:16 am

Hey,

I recently opened a thread regarding field auto completion for v4, but it seems it has been deleted. In my v3, I could have a field auto completion working: viewtopic.php?f=19&t=9459

But when trying it on the v4, the JQuery UI library was not loading when adding it in Setup -> Header. So I tried to add it directly in the JS of the form:

Capture d’écran 2018-05-06 à 22.38.36.png
Capture d’écran 2018-05-06 à 22.38.36.png (193.88 KiB) Viewed 557 times


And it works, now JQuery UI library is loading. But the issue is that it doesn't look good:

Capture d’écran 2018-05-06 à 22.39.50.png
Capture d’écran 2018-05-06 à 22.39.50.png (185.57 KiB) Viewed 557 times


In my v3 it looked way better:

Capture d’écran 2018-05-06 à 22.40.25.png
Capture d’écran 2018-05-06 à 22.40.25.png (127.57 KiB) Viewed 557 times


Any idea where that could come from ?

Thanks
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 98
Joined: Tue Mar 27, 2018 1:27 am

Re: Field auto completion on v4

Postby toms » Mon May 07, 2018 3:05 pm

You need to include the css as well.

http://learn.jquery.com/jquery-ui/getting-started/
toms
 

Re: Field auto completion on v4

Postby marcvander » Tue May 08, 2018 2:24 am

Yes indeed, somehow in the v3 it included it, but not in the v4. So for anyone interested in the answer, since I could not include JQuery UI in Setup -> Header (it did not load it), I included it directly in the form Javascript code. So under Custom Code, here is what I put:

Code: Select all
$.getScript("./jquery-ui-1.12.1.custom/jquery-ui.js", function() {
});

$('head').append('<link rel="stylesheet" type="text/css" href="./jquery-ui-1.12.1.custom/jquery-ui.min.css">');


Thanks toms !
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 98
Joined: Tue Mar 27, 2018 1:27 am

Re: Field auto completion on v4

Postby toms » Tue May 08, 2018 3:49 am

Could you check if this would work (Setup -> Header) ?

Code: Select all
</script>

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

<style>
   
</style>


If it works, you can replace the external links with local ones.
toms
 

Re: Field auto completion on v4

Postby marcvander » Wed May 09, 2018 1:39 am

I tried, and it doesn't work, I still have the error: autocomplete is not a function

Here is how my Setup -> Header looks like:

Code: Select all
function nuHeaderTest() {

    console.log('Functions placed here before a closing script tag are available anywhere in nuBuilder Forte');

}

</script>
</script>

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

<style>
   
.1nuActionButton {background:#8dbef4;}
.1nuButton {background:#8dbef4;}

</style>
<script>
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 98
Joined: Tue Mar 27, 2018 1:27 am

Re: Field auto completion on v4

Postby toms » Wed May 09, 2018 2:12 am

Your setup doesn't look like mine. So you tried mine and logged in again?
toms
 

Re: Field auto completion on v4

Postby marcvander » Thu May 10, 2018 2:49 am

I didn't log out and log in again. After logging in again it worked. Thanks :)
Config:
nuBuilder v4 on a dedicated LAMP server:
-Ubuntu 14.04.5 LTS
-Apache 2.4.7
-MySQL 14.14 Distrib 5.7.22
-PHP 5.5.9-1ubuntu4.23
marcvander
 
Posts: 98
Joined: Tue Mar 27, 2018 1:27 am

Re: Field auto completion on v4

Postby admin » Thu May 10, 2018 4:59 pm

.
admin
Site Admin
 
Posts: 2970
Joined: Mon Jun 15, 2009 9:53 am


Return to Third party software and APIs



cron