-1

I have a text area that has names within the default value. For example the textarea reads..

(dynamic registrant name) just registered to become a donor in (dynamic from pull-down above) honor. This text is editable

So in the same form I have an input that asks the user for their name and a select box where they can choose among a selections of names. I am trying to change the names within the text area based on the values they enter in the input and drop-down fields above the text area. Can someone help with this? I am completely stuck. I have read through some of the forums here and it looks like a lot of the solutions are to use ajax. I have zero experience in ajax and would like to find a solution that does not use that...is it possible? Or could someone help with a solution?

1 Answers1

0

I don't think textarea is what you want exactly. What if the user takes off the (dynamic from pull-down above) part? How would you know where to put the text at? Even if you somehow could, I suggest you make regular text input elements for contents that the user can change and put the other dynamically changing text as uneditable html text elements (or however you want to format them).

Sidharth Mudgal
  • 4,234
  • 19
  • 25
  • So what your saying is to maybe have the drop-downs and input fields populate a chunk of paragraph text that is uneditable? So maybe the user selects the names and then has a text area to change the other text...however all that does is revise/add-to a text block? But I will then need to submit this through a form to a comment post. So any thoughts on how that would be accomplished? – Cody Helgeson Oct 01 '12 at 15:57
  • You could a make a hidden field in your document that combines the result of everything and then it'll be easier. – Sidharth Mudgal Oct 01 '12 at 17:13
  • So I am not at all familiar with that...do you have any suggestions/code examples on how to accomplish this? – Cody Helgeson Oct 02 '12 at 03:05
  • I am sooo close! I have the dynamic text part down in the text area...here is what I have http://pastie.org/4913853 So now all I need to figure out is how I can also have the selection of the drop-down value change the value of the submit button. So what I am thinking is that in the WordPress query I can output the post_ID as the option name....and the have a snippet of JQuery that updates the submit button value with the name of the option selected once the user makes a selection. Can anyone give any insight as to how I would do that? This would solve everything! – Cody Helgeson Oct 05 '12 at 09:32