No announcement yet.

Custom Profile Field for Valid Date Entry

  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom Profile Field for Valid Date Entry

    How do I create a custom profile field for a date? I need to add 2 date fields to each user profile to hold a start date and end date.

  • #2
    Admin CP -> User Profile Fields -> Add New User Profile Field


    • #3
      Not an option. These are the current choices:

      <option value="textarea">Multiple-Line Text Box</option>
      <option value="radio">Single-Selection Radio Buttons</option>
      <option value="select">Single-Selection Menu</option>
      <option value="select_multiple">Multiple-Selection Menu</option>
      <option value="checkbox">Multiple-Selection Checkbox</option>


      • #4
        I would use a "Single-Line Text Box". It's the first option. You can enter any single line of text into that field which is enough for any date or timestamp.


        • #5
          I'm pretty sure you can use Single-Line Text box and Regex (Regular Expression) for this, I just don't know the proper Regex. Maybe this will help:

          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography

          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          • #6
            That can be done.

            What I want to do with these fields is modify user permissions based on the start and end dates. So, if start_date >= today AND end_date <= today $usergroupid = 1 else $usergroupid = 2. Yes, I know that this would never work the way it is written here... only for example of what I need to do.


            • #7
              What do the start and end dates represent? You might be able to use promotions depending on exactly what you want to do.

              Otherwise what you want to do would require modifying the files (for the group queries) in addition to adding the custom field. For questions like this you should post on


              • #8
                The start and end dates represent the terms of a lease. While the lease is active, the user would have access to additional features on the forum.

                Don't know how promotions would do this since they seem to be based on number of posts and are not date related.

                Closest is the subscription manager where I could set various subscriptions (would require approximately 30 different subscriptions to start) for each lease term but no start date can be defined.

                Don't know enough about cron to know if I could use this to activate the subscriptions on the start date.


                • #9
                  I can't think of any easy way to do that without modifying the files.


                  • #10
                    OK. Thanks, Jake.

                    Looks like I'm going to have to dig into the code. Guess the only question is do I start working on 3.0.7 or 3.5 beta 2?


                    • #11
                      Originally posted by vista
                      Looks like I'm going to have to dig into the code. Guess the only question is do I start working on 3.0.7 or 3.5 beta 2?
                      3.5 code is different. 3.0.7 mods will not be 100% compatible.


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