Jump to content

Help creating a form


fatmach

Recommended Posts

hi i am not sure if i should be posting this problem hear.. so please direct me to the right place if i am.

 

I am trying to create a application form, for people wanting to apply for a apartment. I managed to connect to the database set up table, even make the actual form. Know that everything  is done i wanted to make it a little more interactive.

 

I want the form to automatically show the price per month and the size of the apartment if the applicant choses apartment 1 on the form, or if he chooses apartment 2.

 

a managed to tweak around with a filtering system by jquery but i am lost and tired, i wanted to know if there was something simple out there that could help me. Thank you so much for the help.

 

Link to comment
https://forums.phpfreaks.com/topic/228876-help-creating-a-form/
Share on other sites

This should get you started. Of course there are a number of things you can add to prettifiy. It is basically a javascript solution.

<style type="text/css">
#stuff{
width: 200px;
height: 75px;
color: black;
border: solid black;
}
</style>
<script type="text/javascript">
function words(apt){
if(apt=='one'){
	document.getElementById('stuff').innerHTML='Apartment 1<br /> is 4,000 sq feet of pure trash<br />It rents for $35.50 a week';
}else{
	document.getElementById('stuff').innerHTML='Apartment 1<br />is a 15 by 15 cell with a view of the court yard<br />It runs 9 to 15';
}
}
</script>
</head>

<body>

<form>

<input style="float:left;" type="radio" name="sex" value="one" onclick="javascript:words('one');" /> Apt #1        
<input type="radio" name="sex" value="two" onclick="javascript:words('two');" /> Apt #2
<div id="stuff"></div>

</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.