damiancds Posted May 6, 2010 Share Posted May 6, 2010 I'm working on a form, and I'd like for people to add things in steps, where some people might only have three items to add, and some may have five and so on (either way a difference). I'd like a button that adds a text box dynamically without reloading the page so people can keep adding a new item. But, the main thing is I don't want to do it with JavaScript, because it wouldn't work for the people who have it turned off, and then the whole form would be pointless.I've toyed with the idea of having them hidden but then there's always the problem of someone reaching the limit of the boxes I've put in. I'd like to know if this is possible either with plain HTML, or something like PHP, basically where the form will work regardless of the users settings.thanks, Link to comment Share on other sites More sharing options...
Synook Posted May 6, 2010 Share Posted May 6, 2010 Well, you can always have JavaScript for the people with it enabled and then fallback to refreshing the page every time if they don't - HTML is not dynamic and PHP only operates on the server. How would you display the hidden textareas without using JavaScript anyway? Link to comment Share on other sites More sharing options...
damiancds Posted May 6, 2010 Author Share Posted May 6, 2010 I actually thought that you could hide/ unhide without javascript.I guess i'll try the with javascript and without + reload, and see how i like it.Otherwise, I might just do a text area and figure something out with that.thanks, Link to comment Share on other sites More sharing options...
ShadowMage Posted May 6, 2010 Share Posted May 6, 2010 I actually thought that you could hide/ unhide without javascript.You can. Just not dynamically. I guess i'll try the with javascript and without + reload, and see how i like it.I think that's pretty much your only option. Link to comment Share on other sites More sharing options...
jeffman Posted May 6, 2010 Share Posted May 6, 2010 The normal thing is to START with all items visible. On pageload, use JavaScript to hide them. If JavaScript is on, the page will look as you want, and you can use javascript to toggle their display property as suggested above. If javascript is disabled, the user will have access to everything. The only difference is the experience won't be as pretty. Tough. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.