• Congratulations on a fantastic plugin!

    I have a few questions that I can’t seem to get to the bottom of:

    1. I have a list of boxers that vary in weight. When they are sorted by weight all appears fine until there is an entry over 100kg. The system puts this to the top or bottom of list (depending on ascending or descending) Can I overcome this?

    2. on the front end form I have 2 fields for; bouts won and lost. If a boxer enters for example lost fights = 0, 0 seems to be not a valid number? Any thoughts?

    3. Final one; I have a field to enter: date of birth, is there a way of generating the age of that participant?

    One additional general question; are you available for paid custom work. I may need a custom search facility?

    Once I’m live with this I’ll be making a donation.

    http://wordpress.org/extend/plugins/participants-database/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign

    (@xnau)

    taylerjay,

    1) The “other notes” section has a bit about “numeric sorting” and what you need to do to get that to work.

    2) not sure what you mean by not a valid number…a comma is not a valid numeric character, but normally that wouldn’t matter because the database uses strings. Are you trying to validate the field as a number?

    3) No, such a function is not built in to the plugin, but there are several ways you could code such a function in.

    I can probably do a custom search function for you –contact me a support@xnau.com

    Thread Starter taylerjay

    (@taylerjay)

    Many thanks for your prompt response.

    1) I’ll have a look at the other notes about numeric sorting and should be able to get that to work.

    2) Slight misunderstanding. I have a field that labelled: Fights “Won”. A possible answer to this is “0” When “0” is entered, a message appears “The Won field is required.” This works fine in the back-end.

    3 + search function, I’ll get the above working and contact you via email to see if you can look at both, get a cost and an idea when this might be possible.

    Thanks again for both your help and a wonderful plugin.

    Tayler

    Plugin Author xnau webdesign

    (@xnau)

    Tayler,

    OK, zero should be accepted, so I’m going to look into that. Meanwhile, if you need the field to be required, you can use a regex. I don’t know exactly what you’re expecting in that field but this simple regex will require an alphanumeric (i.e. something without punctuation) input:

    /[a-zA-Z0-9]+/

    Select regex for the validation and put that into the space.

    Thread Starter taylerjay

    (@taylerjay)

    Hi Again,

    It appears zero is not accepted. I’ve tried the regex:

    /[a-zA-Z0-9]+/

    and a simple:

    [0-999]

    but no joy!

    Plugin Author xnau webdesign

    (@xnau)

    Tayler,

    Yes, I’ve found that entering a 0 looks like an empty response….even with the regex. Clearly, this is not right. Here’s the fix:

    On line 249 of FormValidation.class.php you’ll find:

    elseif ( empty( $value ) && ! isset( $this->post_array[$validation] ) ) {

    Change this to:

    elseif ( empty( $value ) && $value != '0' && ! isset( $this->post_array[$validation] ) ) {

    That will allow a zero to be accepted as a valid input.

    Thanks for pointing this out…this will be fixed in the next release, so you can upgrade and not worry about this breaking again.

    Thread Starter taylerjay

    (@taylerjay)

    Great! Thanks for your quick and efficient response. I’ll be in touch soon regarding custom search.

    Many thanks

    Tayler

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Participants Database sort’ is closed to new replies.