I need to be able to edit a form layout that contains some simple text, a textfield and a submit button. I need to be able to change the colors of the different elements as well as the text displayed. The form should update it self so it can be previewed by the user, and when the form layout is complete I need to be able to save the full form code in a php variable so it can be submitted to a database.

The form could look like this:

HTML Code:
 <form action="process.php" method="post" style="border: 1px solid #000000; width:150px; height: 150px; background-color:#666699;"  >
 <h3 style="color: #ffffff;"> heading </h3>
 <p style="color: #ffffff;">Text</p>
 <input type="textfield" id="textfield" name ="textfield"><input type="submit" name="submit" id="submit" value="send" />
So the things that should be edited is the text, text color background color, and border color.

The text should be edited in two simple text fields (in another form I guess) and I guess to edit the colors I would need to use some color picker like this one: http://www.eyecon.ro/colorpicker/

I need this for a e-marketing script where the users can edit the layout of the signup form to their email list. Hope it makes any sense what I'm trying to do here

I hope someone have the time to help me creating this or lead me to a tutorial to create this etc.

Thanks a lot,