Does anybody have any idea on how to create a popo...
# suitescript
c
Does anybody have any idea on how to create a popop box where the user should be able to put in values in input fields, and submit them. I only found this: https://4667410-sb1.app.netsuite.com/app/help/helpcenter.nl?fid=section_4497804898.html But unfortunately, it does not seem like i would be able to put input fields within that dialog box.
c
@Watz Thanks, ill take a look. Very appreciated 🙂
b
id be weary of using that technique
c
@battk why
b
it relies on an implementation detail that may not be present on netsuite's next ui
c
I need to get user inputs on submit
Do i have other options
b
as an example, the technique detailed in that article wont work on an inbound shipment
c
Im using it for a suitescript
b
I would recommend picking your favorite javascript library for popups and use that instead
c
Alright, do you have a good one thats easy to implement
does not have to be advanced, the user just needs to be able to put in a few values and then press submit, and then i will handle the submitted values myself with the suitescript
b
sweetalert2 is a reasonable choice, its nicely self contained
c
THanks, so i just download the files and upload them to file cabinet? And then import them to the script, and them im good to go?
b
depends on if you want to customize the css
c
Its not really a priorite
to customize css
b
if you dont care how it looks, then you just need to add sweetalert2.all.min.js to your dependencies
c
I still need to upload the file to netsuite right
message has been deleted
b
yes
c
So all the files or only sweetalert2.all.min.js
so all files should be imported, or only sweetalert2.all.min.js
b
the way this works is that you will be adding client script to whatever you are using
c
already did that
b
that client script will require sweetalert2.all.min.js as a dependency
c
i have a client script paired with a suitelet
yeaa im listening
b
and then you use that dependecy
c
Alright, so i only have to import one file
not all of them
b
correct, the one file I mentioned
c
Thanks!
I will try to do it
w
If you want a more advanced pop-up that has ns-select fields, I'd go with a pop-up suitelet.
c
But i will only be able to use the import on client scripts?
right
@Watz I just need a pop up, where the user can type some percent numbers in and hit submit, and the i will handle the values myself
b
the suitelet is also a reasonable choice if your definition of popup includes a new window/tab
c
It does not
I just want a normal pop up
so i think ill try this out and see if it fits my requirements
239 Views