cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
selimdag
Helper I
Helper I

Add reference for the JavaScript and CSS plugins

Hey,

I created a multi select option set field using javascript refering to the blog post  from Nicholas Hayduk. 

I want to change the look of this field, using Bootsrap Multiselect . However I don't know where I should put the reference of the library. How can I include in Portals the reference of an external library or JavaScript code?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry.. you can add into the HTML of your Web Page

in this post I show how to add the mask jquery plugin, very similar to what you need: http://oliverrodrigues365.com/2020/04/15/power-apps-portals-adding-field-mask/

see if it make clear

 

thanks

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

7 REPLIES 7
OliverRodrigues
Super User II
Super User II

Hi

 

You can create a Web File that will represent the CSS or JS you want to reference.

Create the Web File and attach the file as a Note.

 

Now you can reference it using the partial url: 

<script type="text/javascript" src="my web file partial url"></script>


------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Hi @OliverRodrigues , 

Thanks for your reply. I can't attach the .js file as a Note. I am getting the error: The attachment is not a valid file type. 

 

 

You can change the file types accepted at the CDS level by going in settings --> administration --> system settings: https://www.inogic.com/blog/2010/04/how-to-restrict-attachment-file-type-and-file-size-in-dynamics-c...

 

but there is no need really

my recommendation is renaming the extension of your file, for example from .js to .es

and then upload the file.. but keep the partial url as .js.. so this will still find your js file




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Hi @OliverRodrigues , 

 

and where should I exactly put the reference?

<script type="text/javascript" src="my web file partial url"></script>

 

I am using a Webform in a Website which is showing a Page Template named "Full Page" type of "Rewrite". How to reach the HTML Code of the Website, that I can add this tag?

 

 

hi

there are a few ways to add your JS.. usually when having a Web Form we add the JS at the Web Form Step level

 

in the model-driven app form for Web Form Step you should see a custom JavaScript field

OliverRodrigues_0-1597747503417.png

 


------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

Hi Oliver, 

 

I already added the JavaScript as custom JavaScript in the Webform and the Script works. What I mean is: after adding the external libraries as web files I have to include them in the HTML or?. For example this tags: 

 

!-- Include Twitter Bootstrap and jQuery: -->
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
 
<!-- Include the plugin's CSS and JS: -->
<script type="text/javascript" src="js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="css/bootstrap-multiselect.css" type="text/css"/>

 

 where should to find the HTML code of the Webseite that I can do this? 

 

Sorry.. you can add into the HTML of your Web Page

in this post I show how to add the mask jquery plugin, very similar to what you need: http://oliverrodrigues365.com/2020/04/15/power-apps-portals-adding-field-mask/

see if it make clear

 

thanks

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,552)