-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General solution to phone number format #1462
Comments
I think you'd probably want to use regex, no? Generally I've been fudging these. Most forms (gov and state level included) will take just digits just fine, which is what we generally send. There are a few that need the parentheses version, so we use that there instead. For forms that split up the fields, we just put the entire number in each one and it works for every that I've encountered. So I'm not feeling any urgency to really fix this :) |
Regex is certainly a powerful solution. It would look something like:
I was going for user-friendliness on the YAML generation side, but regex would be a cinch to implement, and could apply to any field with a text value. I like it. |
Yeah, me too -- formatting other fields is a nice bonus. Now, we'd probably want it in the options hash too, like this extension: |
Sounds good to me. Like so:
|
yep, I like it! |
In reference to #597 and #335, how difficult would it be to teach Formageddon to handle phone formatting like this?
That format value would give the 0th through 9th digits of $PHONE in whatever sequence plus whatever other characters necessary. If omitted, it would default to 012-345-6789. This way $PHONE_PARENTHESES and $PHONE_UNDASHED, etc. aren't necessary, and the YAMLs can also accommodate forms that divide the phone number over multiple fields. (I don't know of any Congressional contact forms doing this yet, but at least one gubernatorial form does.)
Thoughts?
The text was updated successfully, but these errors were encountered: