#Multiple images in an Input Label?
1 messages · Page 1 of 1 (latest)
Yes. Just use html like a table or <div>.
Unless you want each one selectable, then use radio with H attribute.
Can't really do it with checkbox for input() but html5 could work.
I just want to display the selected token images at the top of the input in a LABEL. Building a html table isn't working for me.... ```[h: mapID = getCurrentMapID()]
[h: tdData = ""]
[h, FOREACH(tokenID, getSelected()), CODE:
{
[h: tokenImage = strformat('<img src="%s" />', getTokenImage(50, tokenID, mapID))]
[h: tdData = tdData + "<td align=center>"+tokenImage+"<br>"+getName(tokenID, mapID)+"</td>"]
}
]
[h: tokenTable = "<html><table><tr>"+tdData+"</tr></table></html>"]
[h: status = input(
"selectedToken|"+tokenTable+"|| LABEL | SPAN=TRUE"
)
]
[h: abort(status)]```
I think I recall some wonkiness with images in labels. Try putting the html 3rd field and use Text=false.
[h: mapID = getCurrentMapID()]
[h: tdData = ""]
[h, FOREACH(tokenID, getSelected()), CODE:
{
[h: tokenImage = strformat('<img src="%s" />', getTokenImage(50, tokenID, mapID))]
[h: tdData = tdData + "<td align=center>"+tokenImage+"<br>"+getName(tokenID, mapID)+"</td>"]
}
]
[h: tokenTable = "<html><table><tr>"+tdData+"</tr></table></html></html>"]
[h: status = input(
"selectedToken||"+tokenTable+"| LABEL | TEXT=FALSE"
)
]
[h: abort(status)]```
Better yet, toss in an extra </html> to remove the :
Interesting. I figured there were some tricks to get it working. Thanks.
Is there a way to have horizontal checkbox's or do they only go vertical?
"vchk_A|0|test A|CHECK",
"vchk_B|0|test B|CHECK|SPAN=TRUE",
"vchk_C|0|test C|CHECK|SPAN=TRUE")]
[h: abort(status)]```
I'd like if all check boxes were on the same *row*
the radio option has an ORIENT parameter... if that doesn't work with check boxes (and I doubt it does) then I'm guessing you'd have to build your own form.
Could put in a freq... but it doesn't seem like anyone wants to touch input. We need an input5! 😉
Along the same lines and the same folks that would probably know . . . (i think this is a NO) but is there a trick to move the drop downs in this image over and up to the right (ala my arrow 🙂 )?
I think you're looking for a Column Break.
My HTML knowledge is largely research-based, so I'll see if I can find the right tag.
...looks like it's controlled from the variou 'column' properties of the element:
https://www.w3schools.com/css/css3_multiple_columns.asp
In HTML5, yes, input(), no.
With input you could potentially right justify the dropdowns and if you make the radio horizontal it may look more natural.
Let's just say that input() is very ... functional... but unfortunately not very aesthetic...