Jump to content

Advanced web forms


hvandracas

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.