Support » Plugin: Participants Database » Field Format/Form Layout

  • 1. How can I set up a format for a phone field? (xxx) xxx-xxxx

    2. How can I change the layout for any form?

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

    (@xnau)

    To format a phone field like that, you have two options: force the user to enter it like that, or use custom code to format the value that the user enters.

    To change the layout of the forms, you can use one of the other templates that are available, but these are simply frameworks, the final layout of your forms is something you will need to adjust using your own CSS rules.

    Participants Database Shortcode Templates

    Thread Starter perolf

    (@perolf)

    How do you setup the default format? If I knew the code to use, I don’t know where to place the code….

    Plugin Author xnau webdesign

    (@xnau)

    What do you mean by “default format”? For a phone field like that, you can really only us a “text line” field, there is no formatting, just a line of text.

    If you’re asking about how to force the user to type the number in in a specific format, you need to use a regex which will not validate the field until the format is correct. For example, you could use a regex format like this:

    /^\([0-9]{3}\) [0-9]{3}-[0-9]{4}$/

    More info: Using RegEx Validation

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Field Format/Form Layout’ is closed to new replies.