Solved

Hiding the values in a form.

Posted on 2013-05-17
11
200 Views
Last Modified: 2013-06-11
Hi

I have a form with this id:  feedback

I have this html in the form
<input type="checkbox" value="Army" class="0" name="f8_label[]">

Open in new window


How do I hide the value in any checkbox that occurs in the feedback's  checkboxes?  

As it is, the checkbox values are visible in the html to the visitors.

Thanks

Rowby
0
Comment
Question by:Rowby Goren
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 30

Expert Comment

by:LZ1
ID: 39175776
The value of the checkbox isn't displayed normally.

Not sure what you mean exactly.
0
 

Assisted Solution

by:EMHillm4n
EMHillm4n earned 250 total points
ID: 39175786
So, if I understand you correctly, you want the users to be unable to see what underlying value the checkboxes have if they view the HTML source? You can't do that. What you can do is obfuscate the values - just change them to numbers or some arbitrary (but unique) string and have whatever's processing the input map those values to the "real" ones internally.
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39175802
Hi : EMHillm4n,

It's okay if it is visible if someone looks at the source..  But I don't want it visible when you look at the regular page.

Perhaps using the following css that I found just now via a google search....

display:none

or
 visibility:hidden
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 30

Assisted Solution

by:LZ1
LZ1 earned 125 total points
ID: 39175820
As I said in my first comment, the "value" of a checkbox is not normally displayed. You can display a label for it, but in your case you don't need to.

Are you trying to hide the checkbox itself?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39175826
<input type="hidden" value="Army"  name="f8_label[]">
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39175830
If you hide it with css or js it will not show up when you submit the form.
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39175848
If you hide it with css or js it will not show up when you submit the form.

Open in new window


Hmmm..  It needs to show up when the form is submitted and the form results are received by email.

Well then how is this handled in any form.  

Right now the form values are clearly visible in the form I created.   I don't mind the label to be visible.  But the values....   Hmmmm????

I'm going to do a screen capture of the form.  Perhaps that will help... Stay tuned.

Rowby
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 125 total points
ID: 39175869
I gave you the answer....

<input type="hidden" value="Army"  name="f8_label[]">
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39175881
Hi

I am starting to see my problem.  Here's the screen capture.

I see where the radio button has its values showing. But the checkboxes.... not sure how to handle this....

Rowby
form-visible2.jpg
0
 

Accepted Solution

by:
EMHillm4n earned 250 total points
ID: 39238624
Not sure if I'm too late, but it seems to me you don't need the "value" property at all - you only need to retrieve the "checked" property from each of these checkboxes. It looks like you already have unique names for each checkbox, so I would either not set the value or else set it to an empty string.  

Only weird thing is I'm pretty sure it *shouldn't* be showing these values in the first place, and I'm not sure why it is.  I suspect the "formengine" software you're using is helpfully adding the value field as inline text for you... You can probably override that somehow but easiest solution is just not to use the "value" property where you don't need it.
0
 
LVL 9

Author Closing Comment

by:Rowby Goren
ID: 39238637
Hi  

I ended up using a different form system that solved the problem.

However I am keeping your solutions as guides for the future in dealing with checkboxes.

Thanks!

Rowby
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
align Linkedin sign to the right page 5 55
Input box gone wrong 8 33
Changing Color of Page Section 4 23
How to delete "dots" above Bootstrap 3 navbar 4 52
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question