fatmach Posted February 26, 2011 Share Posted February 26, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/228876-help-creating-a-form/ Share on other sites More sharing options...
denno020 Posted February 26, 2011 Share Posted February 26, 2011 You need to post your code that you're working with if you want some directed help. Denno Quote Link to comment https://forums.phpfreaks.com/topic/228876-help-creating-a-form/#findComment-1179906 Share on other sites More sharing options...
sunfighter Posted February 26, 2011 Share Posted February 26, 2011 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> Quote Link to comment https://forums.phpfreaks.com/topic/228876-help-creating-a-form/#findComment-1179913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.