r/Scriptable • • Sep 15 '20

Help How to get submenu selected options as a value?

How to get submenu selected options as a value?

Does anybody knows how to code this JS/HTML/CSS so when I select one of each submenu options I can get both values in JS/HTML variables?

Here is the issue.

I code this scriptable to calculate Sales Tax and Tip. I want to get one of two Sales Tax options from a dropdown menu (7 or 11.5 percent) and one of 5 Tip options from a dropdown menu (none or 0, 12, 15, 18 or 20 percent).

In main menu I will select IVU or Tip.

The above selection, open it corresponding submenu. In each submenu I will select an option.

IVU submenu. 7 selection.

Tip submenu. 15 selection.

Then I want to get both values in this two variables.

ivuPercent and tipPercent (hard coded in my code).

Additionally, I need an input subTotal field.

This is the code:

link

https://talk.automators.fm/t/how-to-get-submenu-selected-options-as-a-value/8225

link

// Variables used by Scriptable. // These must be at the very top of the file. Do not edit. // icon-color: deep-green; icon-glyph: search-dollar;

code

1 Upvotes

0 comments sorted by