hvandracas Posted January 18, 2011 Share Posted January 18, 2011 Good morning, I'm creating a content management system for my game. It's RPG style, so it contains many tasks, however, adding them is a bit complicated process and the system isn't simple. Therefore, simple web form is needed, but there are fields that depend on others. For instance, if quest type is k (which means killing task), a field asking how many different kinds of monsters need to be killed, then there should appear x fields with more specific information. To sum up, i need an example, advice or sth that would help me to create this type of html where new fields appear automatically depending on the chosen ones. Thanks in advance, Karolis Quote Link to comment Share on other sites More sharing options...
Anti-Moronic Posted January 18, 2011 Share Posted January 18, 2011 Well javascript is the only way to do this without posting information back to the page over and over again, so I'd advise you look into jQuery. Here are a couple of tutorials: http://mondaybynoon.com/2009/02/23/creating-custom-form-elements-using-jquery-selects/ The only way to do this with php is to, after selecting a form element, post the form, then present the conditional form elements based on that. As you can imagine, almost everybody opts for the javascript way. Quote Link to comment Share on other sites More sharing options...
hvandracas Posted January 18, 2011 Author Share Posted January 18, 2011 Well, that's a lot of to do. So, i'll have to learn not only jQuery but JavaScript too.^^ Quote Link to comment Share on other sites More sharing options...
hvandracas Posted January 18, 2011 Author Share Posted January 18, 2011 Well, i'd rather remain on PHP option... Although it's more messy,however, this is completely clear to me. Quote Link to comment 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.