pat_codes Posted July 5, 2012 Share Posted July 5, 2012 Automatic text field creator. OK, so im a little bit new to php and I found that the best way to learn is to ask questions. Ok, so im in need of building this feature. The idea is that a user could add another text field just by clicking a link. He would add information into the textbox, and click the submit button. After he hits the submit button it would add the information into a tinymce WYSIWYG editor. The only thing im having trouble with is how to build the feature that will add another text box.. Any information on where I can learn how to do this would be awesome. Check below for some example pictures. Quote Link to comment https://forums.phpfreaks.com/topic/265283-automatic-text-field-creator/ Share on other sites More sharing options...
arenaninja Posted July 5, 2012 Share Posted July 5, 2012 Is the text in these inputs ('Hello#') the name for the new field or is this the information that will populate the new field? In any case, unless you want to do a POST (click a 'Submit' button and refresh the page) it looks like you're looking for jQuery, which will allow you to manipulate DOM elements on the fly. Quote Link to comment https://forums.phpfreaks.com/topic/265283-automatic-text-field-creator/#findComment-1359497 Share on other sites More sharing options...
xyph Posted July 5, 2012 Share Posted July 5, 2012 What have you tried so far? Quote Link to comment https://forums.phpfreaks.com/topic/265283-automatic-text-field-creator/#findComment-1359504 Share on other sites More sharing options...
downah Posted July 5, 2012 Share Posted July 5, 2012 Correct me if I'm wrong but something like this is probably done with ajax? Just trying to think logically that you would need to refresh the page some how to create the new text boxes.. Quote Link to comment https://forums.phpfreaks.com/topic/265283-automatic-text-field-creator/#findComment-1359505 Share on other sites More sharing options...
trq Posted July 6, 2012 Share Posted July 6, 2012 Correct me if I'm wrong but something like this is probably done with ajax? Not Ajax specifically, but it's better done client side with JavaScript. Quote Link to comment https://forums.phpfreaks.com/topic/265283-automatic-text-field-creator/#findComment-1359561 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.