Multiselect dynamic options based on first dropdown - javascript

In my website header I've coded four dropdowns, one is vehicle type, the next is vehicle make, the next is model and the last is vehicle engine size. The selected option for the first dropdown will set the options for the next dropdown and the next selected option will set the options for the next and so on.
I've managed to build and insert the four dropdowns based on code from an old post I found but being the noob I am I have no idea where to insert the backend coding to make the search function properly. So where do I insert the first section of code (seen in the top answer of this old post) to make my dropdowns function dynamically?
I have tried inserting it just above the code for the dropdown boxes but this has not worked.
Edit: I should have said I'm creating this search element using Elementor's HTML widget in a premium theme. This widget allows you to build your own widgets by coding it within the Elementor editor. I'm unsure on which folder I should insert the code into to get the widget to work dynamically.

Related

How to create a dropdown menu using javascript in bluebeam to auto populate a text box

Apologies as I do not have any JavaScript experience. I am looking at creating a stamp for submittals in Bluebeam. I downloaded one of the templates from Bluebeam website which I was able to customize the Javascript for the text fields and radio group. I am looking to create an interactive stamp in Bluebeam.
The last part of the stamp is the description/note that would go along with the "reviewed", "reviewed as noted", or "revise and resubmit" selections. I am looking to select one of those three options in the JavaScript window and based on my selection have it auto populate one of three pre determined descriptions that go along with the selection.
I initially started with a dropdown form on the bluebeam stamp and was trying to have that show up as a dropdown option in the javascript pop up window when I add the stamp to a document in Bluebeam. The issue with this option as you'll see in the image below is that the drop down ends up as single line text which gets cut off. Problem is I'm not sure how to work out the script to allow either of these options to happen. Worst case I would just create 3 different stamps but would like to avoid this if I could.
See images of the current stamp + current script + current interactive javascript window and what I'd like to achieve.
add a pop group and popup items in the stampcode script. if you want to have same as dropdown in the dialog when you apply the stamp.
snapshot
SCRIPT

Implementing dropdown menu in dynamic table columns in html using jquery/js/python

I am creating a program with python that takes a CSV file, filters it and shows it to the user as a filtered file. That works great, but I have a problem when I want to implement dropdown menus for my table.
I used to_html()and <div class="table-responsive">{{data| safe}} </div> to import the file on the html side as a table.
I used javascript/jquery to implement the add/remove buttons, search box. What I can't figure out is how to add dropdown menus, since my table is not shown with HTML tags and each time has a different number of rows.
I have 23 columns and only 3 of them should have dropdown menus from which the user should choose a value for each row.
I created a fiddle to show how it looks currently. Bear in mind that here I just hardcoded my table for the example.- I did insert the class and id for the table on the python side so I can access the inputs in the table.
https://jsfiddle.net/2gw09vpr/1/
Currently, I added an attribute contendEditable for the columns 4,5 and 6 where there should be a dropdown list to choose from. How can I do that?
I am new to python/jquery/js so I am lost on how to do it.
What I tried so far was similar to this:
fiddle 1 ; fiddle 2 ;fiddle 3
stackoverflow
And nothing works for me. Any help would be appreciated.

Showing and hiding a list box on a spawned template page in Adobe Acrobat Pro

I'm struggling here and I'm hoping I'm just missing some small detail.
In a nutshell, I have a PDF file that by default has three pages shown and five hidden template pages. A drop-down form on the first page has five options and depending on the selection one of the five template pages pops up at the end of the document (as page 4).
On one of those template pages is a drop-down with two choices, "High" or "Low". If "High" is selected it shows another drop-down with a few different options and a list box with multiselect enabled. The listbox populates different choices depending on that second drop-down's selection. If "Low" is selected the drop-down and list box are hidden and four checkboxes are unhidden.
All of this works perfectly on the actual template pages, I don't have the exact code with me as of right now (as it's at my work )of the High/Low drop-down, but the code is set as a simple if/else if/else on the drop-down to display.visible/hidden based off of the selection.
The issue I'm running into is that I can not get the listbox to hide when the template pages is hidden and the 4th page is spawned. I have updated the JavaScript to Acrobat's p4.PageName.FormItem format and I've tripple checked my JavaScript and I can't see any errors. Everything else will toggle hidden/visible without an issue, but just not the listbox... If I'm on the template page and I delete and readd the exact same JavaScript it works, but as soon as I spawn a different page and then respawn that one it goes back to not working (which makes sense).
So... What in the world am I doing wrong, or how exactly do I go about fixing this?
I just wanted to provide an answer to my own question, as I was able to finally figure this out. The issue was a simple one, the person that originally made the pdf had a JavaScript code that, for some reason I still don't fully understand, made sure the list box and a few other form fields were always set to visible. Once I removed that everything worked like a charm. Should have probably looked into that first!

Hide a custom column field via SuiteScript based on an option from a dropdown menu

I need to show a custom transaction column field in Netsuite. Netsuite Support Team is useless as well as Netsuite Support website. Can anybody help me with this? I need the field display type to be set to NORMAL when certain options from a dropdown menu are chosen, otherwise, it needs to be hidden.
You cannot do this wholly client side.
Once a list is displayed on a page the columns are fixed.
Your options include:
Use a suitelet and display your header fields as a first page and then your colum fields on the next page after the determining drop-downs have been selected
Make the fields you'd like to hide display only when the drop-downs are selected so at least they are not as much of a bother
Make the column area an inline html table that you control completely.
That last isn't has horrible as it may sound since you can couple that with a hidden sublist of the real items and edit via pop-up suitelet driven dialogs. i.e. the inline table is read-only except for an Edit button. The Edit button triggers a dialog that is sourced from a Suitelet. You do that in an iframe and the post returns a function that populates the selected values. You can also dynamically update the table and skip the post or only add an action button to the suitelet dialog that updates the parent values.

Drop down box in form with a button to add a second copy of drop down box

I have a simple form that lists user names and for each user, the form displays a drop down box with a list of items that can be assigned to the user. Since it is often necessary to assign multiple items to a user, I need to display a button next to the drop down that says "add another item" which automatically inserts another an identical drop down box below the first one and preserves the selected option in the original drop down box.
You might be thinking - why not just display a series of radio buttons or checkboxes? Can't do that for two reasons, 1) the list of items is too long and 2) there are times when I need to assign the same item to a user twice.
I know this "add another item" button can be done in Javascript, I just don't know the code.
Here's an example of what I need to do (not working because there is no onClick function yet).
http://www.dropthechalk.org/sampleform.html
This has nothing to do with dynamically populating the items in the drop down box, so I've found it hard to search for solutions. Any help or links to resources much appreciated!
Here is a tutorial that I did a while ago on dynamically adding input elements via JavaScript. This should be a good starting point.

Categories

Resources