How can I set static text in an input field? - html

I have read many articles related to this topic but none of these articles proffer exact solution to what I am trying to achieve.
I'll like to make "COMPUTER SCIENCE" a static text in the input filed for "Department in the following code".
<table>
<tr>
<td><label for="Username">Username</label></td>
<td><input name="txtusername" type="text" id="txtusername" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Password">Password</label></td>
<td><input name="txtpassword" type="password" id="txtpassword" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Lastname">Lastname</label></td>
<td><input name="txtlastname" type="text" id="txtlastname" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Firstname">Firstname</label></td>
<td><input name="txtfirstname" type="text" id="txtfirstname" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Sex">Sex</label></td>
<td>
<select name="sex" class="form-control" required>
<option value=""> ----- </option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td><label for="ContactNo">Contact No</label></td>
<td><input name="txtcontactno" type="text" id="txtcontactno" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="MatricNo">Matric No</label></td>
<td><input name="txtmatricno" type="text" id="txtmatricno" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Programme">Programme</label></td>
<td><input name="txtprogramme" type="text" id="txtprogramme" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="Department">Department</label></td>
<td> <input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="CFaculty">Faculty</label></td>
<td><input name="txtfaculty" type="text" id="txtfaculty" style="height:20px; width:208px" /></td>
</tr>
<tr>
<td><label for="UploadPhoto">UploadPhoto</label></td>
<td><input type="file" name="image" /> </td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="add" value="Register" id="submit" />
<input type="submit" name="Reset" value="Cancel" id="Reset" />
</td>
</tr>
</table>
I want to achieve a result similar to the output in the attached picture:
Any suggestion or recommendation is greatly appreciated.

As already mentioned, disabling the input field would be the first step.
<tr>
<td><label for="Department">Department</label></td>
<td><input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" disabled/></td>
</tr>
If the value of the department needs to be static, you can just define it directly in the input field.
<td><input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" value="COMPUTER SCIENCE" disabled/></td>
In case the department would have a correlation with a value from an other input field, you could theoretically use JS with some If-Statements.
$(document).ready(function(){
var txtdept = document.getElementById("txtdept");
txtdept.value = "COMPUTER SCIENCE";
});

Not too sure what you mean by static text but you have two ways of doing what is in the image: you can either add placeholder="COMPUTER SCIENCE" the input
<input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" placeholder="COMPUTER SCIENCE" />
and/or add value="COMPUTER SCIENCE".
<input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" placeholder="COMPUTER SCIENCE" value="COMPUTER SCIENCE" />
The placeholder is meant to show when the input is empty. The value will just be the default value of the input and can be changed by the user. You can add disabled to the input if you don't want the user to change the content of the input.
<input name="txtdept" type="text" id="txtdept" style="height:20px; width:208px" value="COMPUTER SCIENCE" disabled/>

Related

Except Line Break in Input Text Fieldset

i have the following html to Capture some Data.
<fieldset>
<legend>Rezept hinzufügen</legend>
<form action="php_act/create.php" method="post">
<table cellspacing="0" cellpadding="0">
<tr>
<th>Rezept Name</th>
<td><input type="text" name="name" placeholder="Rezept Name" /></td>
</tr>
<tr>
<th>Kurzbeschreibung</th>
<td><input type="text" name="kurztext" placeholder="Kurzbeschreibung" class="kurztext" /></td>
</tr>
<tr>
<th>Kategorie</th>
<td><input type="text" name="Kategorie" placeholder="Kategorien - mit , trennen" /></td>
</tr>
<tr>
<th>Anforderung</th>
<td><select name="Anforderung">
<option value="einfach">einfach</option>
<option value="mittel">mittel</option>
<option value="schwer">schwer</option>
</select></td>
</tr>
<tr>
<th>Zeit / Nährwerte</th>
<td><input type="text" name="zeit" placeholder="Zeit in minuten" /></td>
<td><input type="text" name="KCAL" placeholder="KCAL" size="6"/></td>
<td><input type="text" name="KH" placeholder="KH" size="6"/></td>
<td><input type="text" name="Eiweiss" placeholder="Eiweiss" size="6"/></td>
<td><input type="text" name="Fett" placeholder="Fett" size="6" /></td>
</tr>
<tr>
<th>Portionen</th>
<td><input type="text" name="Portionen" placeholder="Portionen" /></td>
</tr>
<tr>
<th>Zutaten</th>
<td><input type="text" name="zutaten" placeholder="Zutaten" /></td>
</tr>
<tr>
<th>Zubereitung</th>
<td><input type="text" name="zubereitung" placeholder="Zubereitung" /></td>
</tr>
<tr>
<th>FotoliaID</th>
<td><input type="text" name="FotoliaID" placeholder="FotoliaID" /></td>
</tr>
<tr>
<td><button type="submit">Speichern</button></td>
<td><button type="button">zurück</button></td>
</tr>
</table>
</form>
</fieldset>
There are some Input Type Text. i need to capture line breaks within the textfields. Problem is that "Enter" submits by default the. Is it possible to change that. Enter should add a line break in the textfield and not submit the form.
Can't you use textarea instead of textbox?
In a textarea you can insert enters.
https://www.w3schools.com/tags/tag_textarea.asp

Calculate sum of input fields

I've created a simple HTML5 form, with the code below.
It successfully works in Chrome in W10, as well as in Chrome on my Android Phone.
The autosum function doesn't work on an iPad in Safari, nor Chrome.
What am I missing?
Cheers,
Stewart
<form onsubmit="return false" oninput="tta.value = parseInt(r1ta.value)+parseInt(r2ta.value)+parseInt(r3ta.value)+parseInt(r4ta.value);ttb.value = parseInt(r1tb.value)+parseInt(r2tb.value)+parseInt(r3tb.value)+parseInt(r4tb.value);te.value = parseInt(r1e.value)+parseInt(r2e.value)+parseInt(r3e.value)+parseInt(r4e.value)">
<table style="height: 97px;" width="216">
<tbody>
<tr>
<td>RINK</td>
<td>TEAM A</td>
<td>TEAM B</td>
<td>ENDS</td>
</tr>
<tr>
<td>1</td>
<td><input id="r1ta" name="r1ta" type="number" /></td>
<td><input id="r1tb" name="r1tb" type="number" /></td>
<td><input id="r1e" name="r1e" type="number" /></td>
</tr>
<tr>
<td>2</td>
<td><input id="r2ta" name="r2ta" type="number" /></td>
<td><input id="r2tb" name="r2tb" type="number" /></td>
<td><input id="r2e" name="r2e" type="number" /></td>
</tr>
<tr>
<td>3</td>
<td><input id="r3ta" name="r3ta" type="number" /></td>
<td><input id="r3tb" name="r3tb" type="number" /></td>
<td><input id="r3e" name="r3e" type="number" /></td>
</tr>
<tr>
<td>4</td>
<td><input id="r4ta" name="r4ta" type="number" /></td>
<td><input id="r4tb" name="r4tb" type="number" /></td>
<td><input id="r4e" name="r4e" type="number" /></td>
</tr>
<tr>
<td>TOTAL</td>
<td><output for="r1ta r2ta r3ta r4ta" name="tta"></output></td>
<td><output for="r1tb r2tb r3tb r4tb" name="ttb"></output></td>
<td><output for="r1e r2e r3e r4e" name="te"></output></td>
</tr>
</tbody>
</table>
</form>
Because your field's default value is not 0 it is null. so it cannot be able to sum 1 + null for ins.

When I click on submit button it's not going to servlet page it's downloading that page why

<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor="lightgray">
<fieldset>
<legend align="center"><blink><font color="grakgreen">Registration</font></blink></legend>
<form action="SaveServlet" method="post">
<table align="center">
<tr>
<th colspan="6">APPLICATION FOR EMPLOYMENT<BR>(Pre-Employment Questionnaire)</th>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr bgcolor="lightgreen">
<th colspan="6">PERSONAL INFORMATION</th>
</tr>
<tr>
<td>NAME:</td>
<td><input type="text" name="lnam" value="" size="30" placeholder="last name"></td>
<td><input type="text" name="fnam" value="" placeholder="first name"></td>
<td colspan="2"><input type="text" name="mnam" value=""size="46" placeholder="middle name"></td>
</tr>
<tr>
<td>PRESENT ADDRESS:</td>
<td><input type="text" name="stree" value=""size="30"placeholder="Street or House NO:"></td>
<td><input type="text" name="cit" value="" placeholder="city"></td>
<td><input type="text" name="stat" value="" placeholder="state"></td>
<td><input type="text" name="zi" value="" placeholder="zip code"></td>
</tr>
<tr>
<td>PERMANENT ADDRESS:</td>
<td><input type="text" name="pstree" value=""size="30" placeholder="Street or House NO:"></td>
<td><input type="text" name="pcit" value="" placeholder="city"></td>
<td><input type="text" name="pstat" value=""placeholder="state"></td>
<td><input type="text" name="pzi" value="" placeholder="zip code"></td>
</tr>
<tr>
<td>PHONE NUMBER:</td>
<td><input type="text" name="phn" value="" size="30"placeholder="Phnoe number"></td>
<td colspan="2">ALTERNATE PHONE NUMBER:</td>
<td><input type="text" name="alpn" value=""placeholder="Alternate phone number"></td>
</tr>
<tr>
<td colspan="3">ARE YOU PREVENTED FROM LAWFULLY BECOMEING EMPLOYEED IN THIS COUNTRY BECAUSE OF VISA OR IMMIGRATION STATUS?</td>
<td colspan="2">Yes<input type="radio" name="ye" value="yes">No<input type="radio" name="ye" value="no"></td>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr bgcolor="lightgreen">
<th colspan="6">EMPLOYEMENT DESIRED</th>
</tr>
<tr>
<td>POSITION:</td>
<td><input type="text" name="positio" value="" size="30"></td>
<td>DATE YOU CAN START:</td>
<td><input type="text" name="cdat" value=""></td>
<td>SALARY DESIRED:</td>
<td><input type="text" name="salar" value=""></td>
</tr>
<tr>
<td>ARE YOU EMPLOYEED NOW?</td>
<td><input type="text" name="empno" value=""size="30"></td>
<td colspan="3">IF SO MAY WE INQUIRE OF YOUR PRESENT EMPLOYER? </td>
<td><input type="text" name="inquir" value=""></td>
</tr>
<tr>
<td>EVER APPLIED TO THIS COMPANY BEFORE?</td>
<td><input type="text" name="applie" value=""size="30"></td>
<td>WHERE?</td>
<td><input type="text" name="wher" value=""></td>
<td>WHEN?</td>
<td><input type="text" name="whe" value=""></td>
</tr>
<tr>
<td>REFERED BY:</td>
<td><input type="text" name="rnam" value=""size="30"></td>
</tr>
<tr>
</tr>
<tr bgcolor="lightgreen">
</tr>
<tr>
<th>EDUCATION</th>
<th>NANME AND LOCATION OF SCHOOL</th>
<th>*NO OF YEARS ATTENDED</th>
<th>*DID YOU GRADUATE?</th>
<th>SUBJECTS STUDIED</th>
</tr>
<tr>
<td>SSC</td>
<td><input type="text" name="schol" value=""size="30"></td>
<td><input type="text" name="year" value=""></td>
<td><input type="text" name="graduat" value=""></td>
<td><input type="text" name="subject" value=""></td>
</tr>
<tr>
<td>INTER/DIPLOMA</td>
<td><input type="text" name="nschol" value=""size="30"></td>
<td><input type="text" name="nyear" value=""></td>
<td><input type="text" name="ngraduat" value=""></td>
<td><input type="text" name="nsubject" value=""></td>
</tr>
<tr>
<td>DEGREE/B.TECH/B.E</td>
<td><input type="text" name="naschol" value="" size="30"></td>
<td><input type="text" name="nayear" value=""></td>
<td><input type="text" name="nagraduat" value=""></td>
<td><input type="text" name="nasubject" value=""></td>
</tr>
<tr>
<td>PG</td>
<td><input type="text" name="nameschol" value="" size="30"></td>
<td><input type="number" name="nameyear" value=""></td>
<td><input type="text" name="namegraduat" value=""></td>
<td><input type="text" name="namesubject" value=""></td>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr bgcolor="lightgreen">
<th colspan="6">GENERAL</th>
</tr>
<tr>
<td>SUBJECTS OF SPECICAL STUDY OR RESEARCH WORK</td>
<td><textarea rows="3" cols="35" name="specia"></textarea></td>
<td>SPECIAL SKILLS</td>
<td colspan="2"><textarea rows="3" cols="47" name="skill"></textarea></td>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr bgcolor="lightgreen">
<th colspan="6"><b>FORMER EMPLOYERS</b>(LIST BELLOW LAST THREE EMPLOYERS, STARTING WITH LAST ONE FIRST).</th>
</tr>
<tr>
<th colspan="2"> DATE MONTH AND YEAR</th>
</tr>
<tr>
<th>From</th>
<th>TO</th>
<th>NAME AND ADDRESS OF EMPLOYER</th>
<th>SALARY</th>
<th>POSITION</th>
<th>REAON FOR LEAVING</th>
</tr>
<tr>
<td><input type="text" name="fdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="tdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="nem" size="35"></td>
<td><input type="text" name="nsalar"></td>
<td><input type="text" name="npositio"></td>
<td><input type="text" name="nreaso"></td>
</tr>
<tr>
<td><input type="text" name="efdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="etdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="eem" size="35"></td>
<td><input type="text" name="esalar"></td>
<td><input type="text" name="epositio"></td>
<td><input type="text" name="ereaso"></td>
</tr>
<tr>
<td><input type="text" name="dfdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="dtdat" value="" placeholder="mm/dd/yyyy" size="28"></td>
<td><input type="text" name="dem"size="35"></td>
<td><input type="number" name="dsalar"></td>
<td><input type="text" name="dpositio"></td>
<td><input type="text" name="dreaso"></td>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr bgcolor="lightgreen">
<th colspan="6">REFERENCES:GIVE THE NAME NAMES OF 3 PERSONS NOT RELATED TO YOU, WHOM YOU HAVE KNOW AT LEAST ONE YEAR.</th>
</tr>
<tr>
<th>NAME</th>
<th>ADDRESS</th>
<th>BUSSINESS</th>
<th>YEARS ACQUAINTED</th>
</tr>
<tr>
<td><input type="text" name="unam" value=""></td>
<td><input type="text" name="uaddres" value=""></td>
<td><input type="text" name="ubusines" value=""></td>
<td><input type="text" name="uyea" value=""></td>
</tr>
<tr>
<td><input type="text" name="knam" value=""></td>
<td><input type="text" name="kaddres" value=""></td>
<td><input type="text" name="kbusines" value=""></td>
<td><input type="text" name="kyea" value=""></td>
</tr>
<tr>
<td><input type="text" name="nname" value=""></td>
<td><input type="text" name="naddress" value=""></td>
<td><input type="text" name="nbusiness" value=""></td>
<td><input type="text" name="nyear" value=""></td>
</tr>
<tr>
</tr>
<tr></tr>
<tr>
</tr>
<tr></tr>
</table>
<center>
<input type="reset" value="reset">
<input type="submit" value="submit">
</center>
</form>
</fieldset>
</body>
</html>
SaveServlet code, I used annotation
protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
res.setContentType("html/text");
PrintWriter out=res.getWriter();
String lnam=req.getParameter("lnam");
String fnam=req.getParameter("fnam");
String mnam=req.getParameter("mnae");
String stree=req.getParameter("stree");
String cit=req.getParameter("cit");
String stat=req.getParameter("stat");
String zi=req.getParameter("zi");
String pstree=req.getParameter("pstree");
String pcit=req.getParameter("pcit");
String pstat=req.getParameter("pstat");
String pzi=req.getParameter("pzi");
String phn=req.getParameter("phn");
String alpn=req.getParameter("alpn");
String ye=req.getParameter("ye");
String positio=req.getParameter("positio");
String cdat=req.getParameter("cdat");
String salar=req.getParameter("salar");
String empno=req.getParameter("empno");
String inquir=req.getParameter("inquir");
String applie=req.getParameter("applie");
String wher=req.getParameter("wher");
String whe=req.getParameter("whe");
String rnam=req.getParameter("rnam");
String schol=req.getParameter("schol");
String year=req.getParameter("year");
String graduat=req.getParameter("graduat");
String subject=req.getParameter("subject");
String nschol=req.getParameter("nschol");
String nyear=req.getParameter("nyear");
String ngraduat=req.getParameter("ngraduat");
String nsubject=req.getParameter("nsubject");
String naschol=req.getParameter("naschol");
String nayear=req.getParameter("nayear");
String nagraduat=req.getParameter("nagraduat");
String nasubject=req.getParameter("nasubject");
String nameschol=req.getParameter("nameschol");
String nameyear=req.getParameter("nameyear");
String namegraduat=req.getParameter("namegraduat");
String namesubject=req.getParameter("namesubject");
String specia=req.getParameter("specia");
String skill=req.getParameter("skill");
String fdat=req.getParameter("fdat");
String tdat=req.getParameter("tdat");
String nem=req.getParameter("nem");
String nsalar=req.getParameter("nsalar");
String npositio=req.getParameter("npositio");
String nreaso=req.getParameter("nreaso");
String efdat=req.getParameter("efdat");
String etdat=req.getParameter("etdat");
String eem=req.getParameter("eem");
String esalar=req.getParameter("esalar");
String epositio=req.getParameter("epositio");
String ereaso=req.getParameter("ereaso");
String dfdat=req.getParameter("dfdat");
String dtdat=req.getParameter("dtdat");
String dem=req.getParameter("dem");
String dsalar=req.getParameter("dsalar");
String dpositio=req.getParameter("dpositio");
String dreaso=req.getParameter("dreaso");
String unam=req.getParameter("unam");
String uaddres=req.getParameter("uaddres");
String ubusines=req.getParameter("ubusines");
String uyea=req.getParameter("uyea");
String knam=req.getParameter("knam");
String kaddres=req.getParameter("kaddres");
String kbusines=req.getParameter("kbusines");
String kyea=req.getParameter("kyea");
String nnam=req.getParameter("nnam");
String naddres=req.getParameter("naddres");
String nbusines=req.getParameter("nbusines");
String nyea=req.getParameter("nyea");
Empb b=new Empb();
b.setLnam(lnam);
b.setFnam(fnam);
b.setMnam(mnam);
b.setStree(pstree);
b.setCit(cit);
b.setStat(stat);
b.setZi(zi);
b.setPstree(pstree);
b.setPcit(pcit);
b.setPstat(pstat);
b.setPzi(pzi);
b.setPhn(phn);
b.setAlpn(alpn);
b.setYe(ye);
b.setPositio(positio);
b.setCdat(cdat);
b.setSalar(salar);
b.setEmpno(empno);
b.setInquir(inquir);
b.setApplie(applie);
b.setWher(wher);
b.setWhe(whe);
b.setRnam(rnam);
b.setSchol(schol);
b.setYear(year);
b.setGraduat(graduat);
b.setSubject(subject);
b.setNschol(nschol);
b.setNyear(nyear);
b.setNgraduat(ngraduat);
b.setNsubject(nsubject);
b.setNaschol(naschol);
b.setNayear(nayear);
b.setNagraduat(nagraduat);
b.setNasubject(nasubject);
b.setNameschol(nameschol);
b.setNameyear(nameyear);
b.setNamegraduat(namegraduat);
b.setNamesubject(namesubject);
b.setSpecia(specia);
b.setSkill(skill);
b.setFdat(fdat);
b.setTdat(tdat);
b.setNem(nem);
b.setNsalar(nsalar);
b.setNpositio(npositio);
b.setNreaso(nreaso);
b.setEfdat(efdat);
b.setEtdat(etdat);
b.setEem(eem);
b.setEsalar(esalar);
b.setEpositio(epositio);
b.setEreaso(ereaso);
b.setDfdat(dfdat);
b.setDtdat(dtdat);
b.setDem(dem);
b.setDsalar(dsalar);
b.setDpositio(dpositio);
b.setDreaso(dreaso);
b.setUnam(unam);
b.setUaddres(uaddres);
b.setUbusines(ubusines);
b.setUyea(uyea);
b.setKnam(knam);
b.setKaddres(kaddres);
b.setKbusines(kbusines);
b.setKyea(kyea);
b.setNnam(nnam);
b.setNaddres(naddres);
b.setNbusines(nbusines);
b.setNyea(nyea);
int status=EmpDbs.save(b);
if(status>0)
{
out.print("<p>Record saved successfully!</p>");
req.getRequestDispatcher("SoftEmp.html").include(req, res);
}
else
{
out.println("Sorry! unable to save record");
}
out.close();
}
}
When I click on submit button SaveServlet is downloading like shown in the image but values are inserted and page is not refresh/rested:
Try using
<input type="submit" value="submit" name="submit"/>

Radio buttons submitting no values

This seems (and should be) simple, but I have no idea why the values for my radio buttons appear empty
<!DOCTYPE html>
<html>
<body>
<form method="post" action="action_page.php">
<table>
<tr>
<th>Intermediate</th><th>Advanced</th><th>No selection</th>
</tr>
<tr>
<td colspan="3">
<label for="td1">1. Bash</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td1" id="td1" value="BashInter"/>
</td>
<td><input type="radio" name="td1" value="BashAdv"/>
</td>
<td><input type="radio" name="td1" value="" /></td>
</tr><tr>
<td colspan="3">
<label for="td1">2. C</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td2" id="td2" value="CInter"/>
</td>
<td><input type="radio" name="td2" value="CAdv"/>
</td>
<td><input type="radio" name="td2" value="" /></td>
</tr><tr>
<td colspan="3">
<label for="td1">3. C++</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td3" id="td3" value="C++Inter"/>
</td>
<td><input type="radio" name="td3" value="C++Adv"/>
</td>
<td><input type="radio" name="td3" value="" /></td>
</tr></table>
<input type="submit" value="Submit">
</form>
<p>If you click "Submit", the form-data will be sent to a page called "action_page.php".</p>
</body>
</html>
If run on W3Schools' (ugh) server, it correctly outputs the input.
e.g.
td1=BashInter&td2=CAdv&td3=
However, my server, for print_r($_POST); returns
[td1] => [td2] => [td3] =>
regardless of what is selected.
Looking at the HTTP headers confirms that nothing is being sent.
All other aspects of the form correctly send their values.
I have tried a number of variants in relation to the values, but nothing has altered the fact that no data actually appears to be sent by the radio buttons.
You didn't specified that your form must be send as a POST one, so used method is defaulted to GET.
Try with
<form action="action_page.php" method="POST">
Last radio button of every set has been kept empty and has black value.
Which means <input type="radio" name="td3" value="" /> needs to be replaced with <input type="radio" name="td3" value="Some value 3" />
So in case you are selecting last radio button from every set then obviously it wont return anything.
Apart from this there is not other problem as long as your HTML code is concerned. If you still face any problem please upload your PHP code as well.
I also suggest to give some some meaningful label to each radio.
Here is the code you may try
<!DOCTYPE html>
<html>
<body>
<form method="POST" action="action_page.php">
<table>
<tr>
<th>Intermediate</th><th>Advanced</th><th>No selection</th>
</tr>
<tr>
<td colspan="3">
<label for="td1">1. Bash</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td1" id="td1" value="BashInter"/> BashInter
</td>
<td><input type="radio" name="td1" value="BashAdv"/> BashAdv
</td>
<td><input type="radio" name="td1" value="Some value 1" /> Some value 1</td>
</tr><tr>
<td colspan="3">
<label for="td1">2. C</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td2" id="td2" value="CInter"/> CInter
</td>
<td><input type="radio" name="td2" value="CAdv"/> CAdv
</td>
<td><input type="radio" name="td2" value="Some value 2" /> Some value 2</td>
</tr><tr>
<td colspan="3">
<label for="td1">3. C++</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="td3" id="td3" value="C++Inter"/> C++Inter
</td>
<td><input type="radio" name="td3" value="C++Adv"/> C++Adv
</td>
<td><input type="radio" name="td3" value="Some value 3" /> Some value 3</td>
</tr></table>
<input type="submit" value="Submit">
</form>
<p>If you click "Submit", the form-data will be sent to a page called "action_page.php".</p>
</body>
</html>

resizing the background color of a form

if you try my code below you can see that the background color is light blue and it occupies the whole page of a site, I want to resize it how can you do that? I mean that the color will fit to the same size where the fill up boxes are,
do i need to add this code: width="60%"
can you please tell me where can I add this? Thanks
<html>
<div style="color:red">[+validationmessage+]</div>
<p style="color:#4C4C4C;font-weight:bold">« You can subscribe here: »</p>
<p>[+MailChimp.message+]</p>
<div style="background-color:#CCDFED">
<form method="post" action="[~[*id*]~]">
<br/>
<table>
<tr>
<td><label style="margin:0.5em"> Email: </label></td>
<td><input type="text" name="mc_EMAIL" size="60"
maxlength="60" style="margin:0.1em" value="" /></td>
</tr>
<tr>
<td><label style="margin:0.5em"> Name: </label></td>
<td><input type="text" name="mc_FNAME" size="60"
maxlength="60" style="margin:0.1em" value="" /></td>
</tr>
<tr>
<td><label style="margin:0.5em"> Last Name: </label></td>
<td><input type="text" name="mc_LNAME" size="60"
maxlength="60" style="margin:0.1em" value="" /></td>
</tr>
<tr>
<td><label style="margin:0.5em"> Website: </label></td>
<td><input type="text" name="mc_URL" size="60" maxlength="60"
style="margin:0.1em" value="" /></td>
</tr>
<tr>
<td><label style="margin:0.5em"> </label></td>
<td><input type="submit" name="subscribe" size="60"
maxlength="60" value="Register" /></td>
</tr>
</table>
</form>
<p><br/></p>
</div>
</html>
Try this:
<form method="post" action="[~[*id*]~]" style="display:inline-block;background-color:#CCDFEF">
Remove the <div style="background-color:#CCDFED"> before the form and </div> after it.