Removing Currency Symbol

Home Forums Calendar Products Community Events Removing Currency Symbol

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #75851

    Hello,

    is there a way to remove the currency symbol from the form? I’m concerned some of our users might be confused about whether or not they need to add it to the cost field.
    Thanks!

    #76229
    Casey
    Participant

    Josh,
    Thanks for reaching out. Are you wanting to remove the entire ‘Currency Symbol’ field from the form?

    #76519

    Yes. Maybe the question should be editing the form altogether.
    Thanks!

    #76625
    Casey
    Participant

    Josh,
    The best way to do this is with a template override.

    1) Just create the following new directory structure in your theme directory: ‘/tribe-events/community’

    2) After doing that, go to ‘wp-content/plugins/the-events-calendar-community-events/views/community/’ and copy ‘edit-event.php’ into the new folders you created in step one.

    3) Once you’ve copied ‘edit-event.php’ open it in a text editor and change line 65 to the following:


    <?php //tribe_get_template_part( 'community/modules/cost' ); ?>

    This will comment out the code that displays the cost fields on your form. Feel free to copy over and override any other views from the plugin directory if you’re familiar with PHP.

    Hope that helps!

    #76677
    cmeigs
    Participant

    This is very helpful. Thank you Casey. In my specific case I wanted to just remove the “$” but still have the Event Cost Module display. How I accomplished this was copy the file here:
    ‘\wp-content\plugins\the-events-calendar-community-events\views\modules\cost.php’

    To:
    ‘\wp-content\themes\my-theme\tribe-events\community\modules’

    and removed this section:

    :

    <input type='text' id="EventCurrencySymbol" name="EventCurrencySymbol" size="2" value="” />

    but still kept the currency text box but modified to be hidden:
    <input type='text' id="EventCurrencySymbol" name="EventCurrencySymbol" size="2" value="” />

    <input type='hidden' id="EventCurrencySymbol" name="EventCurrencySymbol" size="2" value="” />

    #76678
    cmeigs
    Participant

    This is very helpful. Thank you Casey. In my specific case I wanted to just remove the \”$\” but still have the Event Cost Module display. How I accomplished this was copy the file here:
    \’\\wp-content\\plugins\\the-events-calendar-community-events\\views\\modules\\cost.php\’

    To:
    \’\\wp-content\\themes\\my-theme\\tribe-events\\community\\modules\’

    and modified the input textbox to be hidden:

    <input type=\'text\' id=\"EventCurrencySymbol\" name=\"EventCurrencySymbol\" size=\"2\" value=\"\” />

    <input type=\'hidden\' id=\"EventCurrencySymbol\" name=\"EventCurrencySymbol\" size=\"2\" value=\"\” />

    #76745

    I ended up wanting the cost to remain, so I also changed it in the module. I also figured out from this how to re-order some of the other fields as needed. Thanks for your help!

    #76982
    Casey
    Participant

    Great! Thanks for confirming that this got you sorted. Since it looks like you’re all set here, I’m going to mark this thread “Answered” and close it out.

    We really appreciate your support and please let us know if you need anything else in the future. If you find yourself with a few minutes and would be so kind as to give us a “Works” rating or a positive star voting on the WordPress.org repo (http://wordpress.org/extend/plugins/the-events-calendar/), or even a shoutout to your followers on Facebook or Twitter, it would mean a lot to us. Thanks again for using the plugin.

    #982036
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Removing Currency Symbol’ is closed to new replies.