24/06/2007, 13:13
|
| | | Fecha de Ingreso: febrero-2006
Mensajes: 379
Antigüedad: 18 años, 3 meses Puntos: 5 | |
Como añadirle Style a este codigo de Formulario? Tengo este formulario, WP-ContactForm una de las partes del formulario esta compuesto por este codigo que pertenece a las opciones de administración. Código PHP: <?php /* Description: Opciones de administracion para WP-ContactForm */ load_plugin_textdomain('wpcf',$path = 'wp-content/plugins/wp-contact-form'); $location = get_option('siteurl') . '/wp-admin/admin.php?page=wp-contact-form/options-contactform.php'; // Form Action URI /*Lets add some default options if they don't exist*/ add_option('wpcf_email', __('[email protected]', 'wpcf')); add_option('wpcf_subject', __('Comentario del blog', 'wpcf')); add_option('wpcf_success_msg', __('Gracias por tu comentario!', 'wpcf')); add_option('wpcf_error_msg', __('Por favor complete todos los campos requeridos.', 'wpcf')); add_option('wpcf_show_quicktag', TRUE); /*check form submission and update options*/ if ('process' == $_POST['stage']) { update_option('wpcf_email', $_POST['wpcf_email']); update_option('wpcf_subject', $_POST['wpcf_subject']); update_option('wpcf_success_msg', $_POST['wpcf_success_msg']); update_option('wpcf_error_msg', $_POST['wpcf_error_msg']); if(isset($_POST['wpcf_show_quicktag'])) // If wpcf_show_quicktag is checked {update_option('wpcf_show_quicktag', true);} else {update_option('wpcf_show_quicktag', false);} } /*Get options for form fields*/ $wpcf_email = stripslashes(get_option('wpcf_email')); $wpcf_subject = stripslashes(get_option('wpcf_subject')); $wpcf_success_msg = stripslashes(get_option('wpcf_success_msg')); $wpcf_error_msg = stripslashes(get_option('wpcf_error_msg')); $wpcf_show_quicktag = get_option('wpcf_show_quicktag'); ?> <div class="wrap"> <h2><?php _e('Formulario de Contacto, Opciones', 'wpcf') ?></h2> <form name="form1" method="post" action="<?php echo $location ?>&updated=true"> <input type="hidden" name="stage" value="process" /> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <tr valign="top"> <th scope="row"><?php _e('Dirección, E-mail:') ?></th> <td><input name="wpcf_email" type="text" id="wpcf_email" value="<?php echo $wpcf_email; ?>" size="40" /> <br /> <?php _e('Esta es la direccion a la que se le enviara el email.', 'wpcf') ?></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Asunto:') ?></th> <td><input name="wpcf_subject" type="text" id="wpcf_subject" value="<?php echo $wpcf_subject; ?>" size="50" /> <br /> <?php _e('Este sera el asunto del email.', 'wpcf') ?></td> </tr> </table> <fieldset class="options"> <legend><?php _e('Respuestas', 'wpcf') ?></legend> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <tr valign="top"> <th scope="row"><?php _e('Formulario correcto:', 'wpcf') ?></th> <td><textarea name="wpcf_success_msg" id="wpcf_success_msg" style="width: 80%;" rows="4" cols="50"><?php echo $wpcf_success_msg; ?></textarea> <br /> <?php _e('Cuando el formulario este correctamente rellenado, este será el mensaje que vera el usuario.', 'wpcf') ?></td> </tr> <tr valign="top"> <th scope="row"><?php _e('Error en el formulario:', 'wpcf') ?></th> <td><textarea name="wpcf_error_msg" id="wpcf_error_msg" style="width: 80%;" rows="4" cols="50"><?php echo $wpcf_error_msg; ?></textarea> <br /> <?php _e('Si el usuario no rellena un de los campos requeridos, verá este mensaje.', 'wpcf') ?> <br /> <?php _e('Puede aplicar CSS en este texto, colocándolo entre <code><p style="[su CSS aqui]"> </p></code>.', 'wpcf') ?><br /> <?php _e('IE. <code><p style="color:red;">Por favor complete todos los campos requeridos.</p></code>.', 'wpcf') ?></td> </tr> </table> </fieldset> <fieldset class="options"> <legend><?php _e('Avanzado', 'wpcf') ?></legend> <table width="100%" cellpadding="5" class="editform"> <tr valign="top"> <th width="30%" scope="row" style="text-align: left"><?php _e('Insertar Quicktag en el editor', 'wpcf') ?></th> <td> <input name="wpcf_show_quicktag" type="checkbox" id="wpcf_show_quicktag" value="wpcf_show_quicktag" <?php if($wpcf_show_quicktag == TRUE) {?> checked="checked" <?php } ?> /> </td> </tr> </table> </fieldset> <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Update Opciones', 'wpcf') ?> »" /> </p> </form> </div> Bueno resulta que cuando el usuario envia el formulario correctamente le aparece como respuesta el siguiente mensaje: Gracias por tu comentario!
Que esta en esta parte del codigo: Código PHP: /*Lets add some default options if they don't exist*/ add_option('wpcf_email', __('[email protected]', 'wpcf')); add_option('wpcf_subject', __('Comentario del blog', 'wpcf')); add_option('wpcf_success_msg', __('Gracias por tu comentario!', 'wpcf')); add_option('wpcf_error_msg', __('Por favor complete todos los campos requeridos.', 'wpcf')); add_option('wpcf_show_quicktag', TRUE); Lo que me gustaria saber es si seria posible añadirle style a esa función y como a ese mensaje, ya que al no tenerlo, me muestra el texto demasiado grande y se descuadra.
Gracias:
Si necesitais el codigo del formulario esta en el siguiente post: |