WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP-Members] changing the size of the reg form fields

[Plugin: WP-Members] changing the size of the reg form fields

  • Hi

    There is a way of changing the size (number of columns) of the registration form fields without the need of reinstall the plugin?
    After some ressearch i´ve found that almost all sets are stored in the db table “wp_option” as a single array in “wpmembers_fields” . Here follows the array:

    [code]a:15:{i:0;a:7:{i:0;i:1;i:1;s:4:”Nome”;i:2;s:10:”first_name”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”y”;}i:1;a:7:{i:0;i:2;i:1;s:9:”Sobrenome”;i:2;s:9:”last_name”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”y”;}i:2;a:7:{i:0;i:3;i:1;s:9:”Endereço”;i:2;s:5:”addr1″;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:3;a:7:{i:0;i:4;i:1;s:13:”End. opcional”;i:2;s:5:”addr2″;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”n”;i:6;s:1:”n”;}i:4;a:7:{i:0;i:5;i:1;s:6:”Cidade”;i:2;s:4:”city”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:5;a:7:{i:0;i:6;i:1;s:6:”Estado”;i:2;s:8:”thestate”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:6;a:7:{i:0;i:7;i:1;s:3:”CEP”;i:2;s:3:”zip”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:7;a:7:{i:0;i:8;i:1;s:5:”País”;i:2;s:7:”country”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:8;a:7:{i:0;i:9;i:1;s:8:”Telefone”;i:2;s:6:”phone1″;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”n”;}i:9;a:7:{i:0;i:10;i:1;s:5:”Email”;i:2;s:10:”user_email”;i:3;s:4:”text”;i:4;s:1:”y”;i:5;s:1:”y”;i:6;s:1:”y”;}i:10;a:7:{i:0;i:11;i:1;s:7:”Website”;i:2;s:8:”user_url”;i:3;s:4:”text”;i:4;s:1:”n”;i:5;s:1:”n”;i:6;s:1:”y”;}i:11;a:7:{i:0;i:12;i:1;s:3:”AIM”;i:2;s:3:”aim”;i:3;s:4:”text”;i:4;s:1:”n”;i:5;s:1:”n”;i:6;s:1:”y”;}i:12;a:7:{i:0;i:13;i:1;s:8:”Yahoo IM”;i:2;s:3:”yim”;i:3;s:4:”text”;i:4;s:1:”n”;i:5;s:1:”n”;i:6;s:1:”y”;}i:13;a:7:{i:0;i:14;i:1;s:18:”Jabber/Google Talk”;i:2;s:6:”jabber”;i:3;s:4:”text”;i:4;s:1:”n”;i:5;s:1:”n”;i:6;s:1:”y”;}i:14;a:7:{i:0;i:15;i:1;s:3:”Bio”;i:2;s:11:”description”;i:3;s:8:”textarea”;i:4;s:1:”n”;i:5;s:1:”n”;i:6;s:1:”y”;}}[/code}

    So do I need to change te db or there is a CSS approach?

    Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m not totally sure what you are asking… If you are asking about editing the fields themselves, I would edit the install, then force a new install (doing in pro grammatically is best, unless you really understand how to edit the array in MySQL directly).

    If you are asking about CSS in terms of display, that is handled separately. There is a recent discussion of this here. (There has been some confusion as I inadvertently indicated that the CSS specifications where IDs and they are classes; something that I will address in the updated FAQs.)

    Hope that helps, either way.

    Hi cbutlerjr

    Let me try to clarify a bit 🙂

    What i´m trying to do is just increase the size of the fields, for instance, in the reg form:

    ……………
    Name : …………… here we have a …let´s say 20 colunms field

    How can I get:

    ………………………….
    Name:…………………………. a 40 columns field?

    That´s a request from a client, belive me 🙁

    Thanks

    I would edit the install, then force a new install (doing in pro grammatically is best, unless you really understand how to edit the array in MySQL directly).

    That´s not the case, sorry.I´ve just posted the array trying to get an idea where/what is the number that creates the size of the fields.

    ahhh… That makes sense. You can do this with CSS by specifying font size. Alternatively (and somewhat easier), the form fields are all generated on the fly by wpmem_create_formfield in wp-members-core.php. You could hard code the size in there, but it should be noted that you can’t directly upgrade then without redoing this customization.

    Does that help?

    Hi
    Thanks for your reply.

    I´ve found around line 825 of wp-members-core.php

    case "textarea":
    
    		echo "<textarea cols=\"20\" rows=\"5\" name=\"$name\">$value</textarea>";
    
    		break;

    But had no luck playing with <textarea cols=\”
    Do I nedd to reinstall in order to see any diference?

    Thanks 🙂

    PS. I´ll try via CSS and post some news

    What you are trying to change are input fields (<input type="text">), not textarea (<textarea>). You need to edit the case for “text” (which is the case above the one you posted) and add a “size” attribute to the tag.

    case "text":
    		echo "<input name=\"$name\" type=\"$type\" id=\"$name\" value=\"$value\" size=\"60\" />\n";
    		break;

    (Important: this is php outputting an HTML tag, so you need to be aware of escaping quotation marks, etc.)

    More information form tags, specifically “input”:

    Thank you cbutlerjr

    It works 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP-Members] changing the size of the reg form fields’ is closed to new replies.
Skip to toolbar