Customized phone number field format

Home Forums Calendar Products Community Events Customized phone number field format

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1190473
    Torsten
    Participant

    Hey there,

    How can I have a customised format of the phone number field?
    I want the phone submitted phone numbers all have the same format (e.g. area code – number)

    Another question is how can I have a submission form that only allows a limited amount of characters (e.g. 1000) with a character counter like at twitter or similar? It should work for the code and the wysiwyg part of the input field.

    Thanks for your help and cheers,
    Torsten

    #1190894
    Geoff
    Member

    Hello Torsten and happy Friday!

    Those are both interesting questions and I have to admit that there are no settings in Community Events that support forcing a phone number format or a character limit on event content submissions.

    I imagine you would be able to accomplish both with some custom development. While I do not have the exact code for you, I was able to find an example of how forcing a phone number format could be done using jQuery:

    http://stackoverflow.com/questions/10930866/auto-format-phone-number-in-jquery

    I think both of these would make great suggestions over in our feature requests forum. There’s no guarantee that we would be able to build them into the products, but this will make sure they are considered and allow others to vote on them as well:

    https://tribe.uservoice.com/forums/195723-feature-ideas

    Sorry again for not having a solid workaround for you here, but does this at least help answer your question as far as whether those features are possible? Please let me know.

    Cheers,
    Geoff

    #1193332
    Torsten
    Participant

    Hey Geoff,

    Thanks for this!

    I actually found a plugin that is limiting the characters and displaying it. It is called “Word Count and Limit” and works fine within the backend for post, pages and adding events.
    However it is not working for the “outside” event submission page in my case at http://psychiatrie-frankfurt-am-main.de/events/community/add/ for the event description form.

    Would you be able to amend the PHP/JS script a bit to make this work?

    I also actually have tried it with a JS script that works but only for the text (or code) type of the event description field not when I use the editor. You can see this here:

    // character limit for event submission text fields
    
    // Add ID to Description textarea
    jQuery(document).ready(function ($) {
        // Set your character limit
        var count_limit = 1000;
    
        // Set the initial symbol count on page load
        $('#tcepostcontent-wc span').html($('#tcepostcontent').val());
    
        $('#tcepostcontent').on('keyup', function () {
            var char_count = $(this).val().length;
            var tcepostcontent = $(this).val();
            var text_remaining = count_limit - char_count;
    
            // Update the character count on every key up
            $('#tcepostcontent-wc span').html(text_remaining);
    
            if (char_count >= count_limit) {
                $('#tcepostcontent-wc').css('color', 'red');
                $(this).val(tcepostcontent.substr(1, count_limit));
            } else {
                $('#tcepostcontent-wc').css('color', null);
            }
    
        }).after('<p id="tcepostcontent-wc">Maximal 1000 Zeichen stehen zur Verfügung: <span>1000</span></p>');
    });

    Maybe you can amend that one a bit so it works?

    Thanks for all your help!

    Kind regards,
    Torsten

    #1193807
    Geoff
    Member

    Hi Torsten,

    Nice find on the plugin!

    I tried working with the script a bit, but am afraid I couldn’t tweak it any further than what you have.

    I’ve shared this thread with others on the support team to see if anyone else would be able to contribute any thoughts. If someone is able to, they will be sure to follow-up directly and update this thread.

    In the meantime, however, we do have a list of recommended developers you might want to consider for help. We’re fairly limited in how much we can support custom development questions like this, but one of the recommended developers ought to be able to support this for sure.

    If you don’t mind, I’d like to close this thread for now and one of the folks on our team will update it if they’re able to work with the script — is that ok?

    Thanks!
    Geoff

    #1203890
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Customized phone number field format’ is closed to new replies.