Sending variables to KM from bootstraps tag input (HTML prompt)

I’m using bootstraps to format an input field for tag labels in a custom HTML prompt. The format looks good, but the variable ‘tagsVar’ isn’t created in KM on submission.

<input type="text" name="tagsVar" value="work,test1" data-role="tagsinput">

.bootstrap-tagsinput {
background-color: #fff;
display: inline-block;
padding: 4px 6px;
color: #555;
vertical-align: middle;
border-radius: 0px;
max-width: 170%;
max-height: 50px;
line-height: 22px;
cursor: text;
font-family: ‘Lato’, sans-serif;
font-size: 0.875em;
width: 240px;
height: 50px;
padding: 0px 15px 0px 15px;
outline: none;
color: #FFF0BD;
border: solid 2px #FECF5D;
border-bottom: none;
.bootstrap-tagsinput input {
border: none;
box-shadow: none;
outline: none;
background-color: transparent;
padding: 0 0px;
margin: 0;
height: 25px;
width: 50px;
max-width: inherit;

Are you submitting the form properly? You should be using something like this:

<button name="OK" type="button" 

I'm using:

<input id="submit" type="submit" value="QUICK SAVE" onclick="window.KeyboardMaestro.Submit('quick')">

It's properly passing variables from a datepicker and three text fields, but the bootstraps tag input isn't passing through.

Her e's the entire macro file (sorry the code is messy, I'm new and haven't figured out how to organize yet)

v1.10_INPUT_GLOBAL_EVERNOTE_NEW NOTE (needs helper).kmmacros (34.4 KB)

A couple of things. First, terminology. It’s “Bootstrap”, not “bootstraps”. Took me a while to understand what you were talking about.

Second, you have 3 html elements with the same “id”, “nname”. This looks suspicious. It’s technically wrong (ids are supposed to be unique), although I don’t know if this could be the issue, but try changing that and see if it helps.

Thanks for the clarification. The easy answer to why there are three elements with the same ID is because I don’t know what ID actually does. What I did know is that setting ID to nname for those three elements got them to look the way I wanted.

So, I triplicated the CSS and changed each element to unique id. No luck in passing the tag variables through, but everything else is still coming through okay.

I suspect the issue is that Bootstrap isn’t using the name property as I would expect. It’s like that is getting lost in translation

I don't believe this is a Bootstrap issue. I could be wrong, but that's what I'm thinking.

I have a Bootstrap example I uploaded a while back:

I know it talks about auto-complete, but it has all the standard input types also, so perhaps it will help? Just ignore the auto-complete stuff.

@Owen_Halligan this seems to be working for me. The tags I enter are getting passed along.

Yeah, they definitely work. Custom HTML Prompt is pretty darn cool, if you ask me.

Thanks for taking a look! I never took the step to add new tags and send them through. I was only trying to work with the default values (doh!) It seems to work when I add additional tags but if I leave the default values alone, the variable does not pass through. This is a lot better than not working at all, but any ideas why the default value would act different than a user input value?

Not off the top of my head. I’d have to spend time looking, and frankly, once I find something that works, I just copy and paste. :slight_smile: