WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
add ID tags (4 posts)

  1. gSaenz
    Member
    Posted 2 years ago #

    Love the plug in, use it all the time, have donated. One thing I get asked all the time is to style the "Your email" and sub/unsub buttons. I can go in and change the plug in files but these changes are lost when there is an updated. So, can you add ID tags to these fields so we can style via css.

    For example (generated code)

    <form method="post" action=""><input type="hidden" name="ip" value="xxx" /><p><label for="s2email" id="s2emailButton">Your email:</label><input type="text" name="email" id="s2email" value="Enter email address..." size="20" onfocus="if (this.value == 'Enter email address...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Enter email address...';}" /></p><p><input type="submit" id="s2emailButton" name="subscribe" value="Subscribe" /> <input type="submit" id="s2emailButton" name="unsubscribe" value="Unsubscribe" /></p></form>

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @gSaenz,

    Just use an attribute selector in you CSS like this:

    input[type=submit]{
    PROPERTY:VALUE;
    }
  3. gSaenz
    Member
    Posted 2 years ago #

    didnt think about that, thank you.

    Is there a way to suppress the value in a similar fashion as that?

    <input type="text" name="email" id="s2email" value="Enter email address..." size="20" onfocus="if (this.value == 'Enter email address...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Enter email address...';}" />

    So that it's just an empty box

  4. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @gSaenz,

    Maybe use the JavaScript onLoad event and something like this:

    onload="document.getElementsByName('email')[0].value = '';"

    It will hide the value by default but then if you click in the window and click out again the text will appear. I suspect a little more JS could fix that too if you really wanted.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags