Link to home
Start Free TrialLog in
Avatar of speedtofly
speedtoflyFlag for United States of America

asked on

Wordpress and sign up form

Hi

I try to add a form on my wordpress account.

When I past the script and save it take out the script tags and then I have the code showing up instead of the form.
(for created with form builder 7.9)

I tried to copy the code from dreamweaver no luck

What can I do ?
Avatar of gwkg
gwkg
Flag of United States of America image

Are you trying to change the sign up form for wordpress.com?  I doubt that can be done.
Avatar of speedtofly

ASKER

Sorry I should have specify

I want to add a sign up form in word press.org
It's not so simple if you are not familiar with using Wordpress hooks.

For example, to add an extra field for a users Twitter name you would need something like this

add_action( 'show_user_profile', 'show_extra_profile_fields', 10 );
add_action( 'edit_user_profile', 'show_extra_profile_fields', 10 );
 
function show_extra_profile_fields( $user ) { ?>
      <input type="text" name="twitter" value="<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>" />
<?php }

and this to save

add_action( 'personal_options_update', 'save_extra_profile_fields' );
add_action( 'edit_user_profile_update', 'save_extra_profile_fields' );
 
function save_extra_profile_fields( $user_id ) {
      if ( !current_user_can( 'edit_user', $user_id ) )
            return false;
      update_usermeta( $user_id, 'twitter', $_POST['twitter'] );
}

http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/

Have you considered a plugin?

http://wordpress.org/extend/plugins/register-plus-redux/

Well that is for editing the user registration.

Unless when you say "sign up form" you are trying to add a completely different form to sign up for something other than your blog?
Yes indeed.

I just want one title : "sign up for our newsletter" (for example)

One box : "your email address"

And one button saying : " Sign up"

With an after message : "thank you for registering to our newslettert"

That's all
Something like that


sign-up-form.jpg
Oh, so you are trying to paste the code into a post or page?

You'll need this plugin to allow scripting in those

http://wordpress.org/extend/plugins/exec-php/

Either that or put it directly into one of the php template files.
Maybe the solution is so simple that you are pasting the code into the 'Visual' tab and not the 'Html' tab.
ASKER CERTIFIED SOLUTION
Avatar of gwkg
gwkg
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial