Ben

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Removing actions? #57225
    Ben
    Participant

    That did it. Thanks so much for your help.

    in reply to: How to add additional "Field Type"? #31180
    Ben
    Participant

    Thanks for your reply, Barry. You’re right, I spoke too soon. I’m still figuring out WordPress’s hook system, but I see now that you need to call remove_action() to remove the standard ECP function. I do look forward to having textarea as a standard field option, however, it’s not difficult to add as it stands.

    in reply to: How to add additional "Field Type"? #30974
    Ben
    Participant

    Well, it won’t let me post the code or edit my previous comments, but if you look in event-meta-options.php you should see what I mean. If a moderator would like to delete my previous comment, feel free.

    in reply to: How to add additional "Field Type"? #30973
    Ben
    Participant

    That is:
    <option value="textarea" >

    in reply to: How to add additional "Field Type"? #30972
    Ben
    Participant

    A couple of points. First, one of the main reasons I bought ECP was to add a textarea – so this is pretty disappointing. Second, the display of a textarea field is already defined in admin-views/event-meta.php, so all that is required to make this work is to add the option into the select field in admin-views/event-meta-options.php (around line 40), like so:
    <option value="textarea" >

    Yes, only one line of code is required to add this functionality. What is added if you do this, however, is a pretty lame little textarea. Still, it’s better than a text input if you need more space.

    Finally, the hook mentioned by Barry above is pretty much useless because if you add it into your theme or plugin, it doesn’t override the standard hook function, so the original hook function and the custom one are both called separately. This creates problems I won’t go into here, but is unfortunately not a viable approach, as far as I can tell.

Viewing 5 posts - 1 through 5 (of 5 total)