Announcement

Collapse
No announcement yet.

Setting User Profile Fields During Registration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting User Profile Fields During Registration

    I've added a "field6" which is a multi-select check box, which I have 3 check boxes currently. I access them like a bitflag (1,2,4 etc) I would like to have 2 off by default, and 1 on by default when a user registers.

    Currently, they are all off by default, and I don't see a way to set them as checked or unchecked by default in the profile editor?

  • #2
    The only way I know of to set a default value on a custom profile field is to set a default value for the database field itself. Backup your database and try running this query:

    ALTER TABLE userfield CHANGE field6 field6 INT(10) DEFAULT 1 NOT NULL

    That should work.

    Comment


    • #3
      Thanks, I will try that out.

      I currently set the profile field to appear on the registration form, then I found the code in register.php for displaying these fields and just pre-set it there.

      This would be a nice addition for a future realase of vBulletin to allow these settings to have default values.

      Then again, being a IIS user, I would rather see the Archive working

      Comment


      • #4
        Originally posted by socals View Post
        Thanks, I will try that out.

        I currently set the profile field to appear on the registration form, then I found the code in register.php for displaying these fields and just pre-set it there.

        This would be a nice addition for a future realase of vBulletin to allow these settings to have default values.

        Then again, being a IIS user, I would rather see the Archive working
        sorry for resurrecting such an old post, but its exactly what i was wondering about . anyway...

        i believe that the suggestion about modifying the db will effectively set the value for the field, but i don't think it makes the checkboxes "visually" appear checked on the registration form.

        so how did you/would you make all the checkboxes of a multi-selection checkbox show up checked by default on the registration form?

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X