TransWikia.com

Is there a way to create a CheckBox without a label?

TeX - LaTeX Asked by ray_lv on March 24, 2021

I am using Hyperref and Form to create a CheckBox, but I don’t want any text near it. It should be without any labels, but I can’t leave the parentheses empty, like so:

CheckBox[checked=true]{}

I need a simple lonely box to check. I’ve already tried writing null within the curly brackets but that didn’t work and now I can’t think of any other ways to do this.


Edit:
As an example: I want to create this table, where the 3rd column (with the square brackets) is where the checkbox should be.

The user should be able to check either one of them.

enter image description here

Code:

documentclass[11pt]{article}
usepackage{hyperref}

begin{document}

begin{tabular}{|l|l|c|}
hline
multicolumn{3}{|c|}{Q1) What is the meaning of Life?}
hline hline
a)& 42& CheckBox[bordercolor=,checked=false]{}
hline
b)& Make ur own& CheckBox[bordercolor=,checked=false]{}
hline
end{tabular}

end{document}

What I have noticed is that if leave the curly brackets in CheckBox[...]{} empty, the program runs without error, but the resulting document doesn’t show any interactive checkboxes.

One Answer

Adding a unique name to each CheckBox resuts in the following output:

enter image description here

documentclass[11pt]{article}
usepackage{hyperref}

begin{document}

begin{tabular}{|l|l|c|}
hline
multicolumn{3}{|c|}{Q1) What is the meaning of Life?}
hline hline
a)& 42& CheckBox[bordercolor=,checked=false, name=a]{}
hline
b)& Make ur own& CheckBox[bordercolor=,checked=false, name=b]{}
hline
end{tabular}

end{document}

Correct answer by leandriis on March 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP