Support » Plugin: Business Directory Plugin » Extending Business Directory Plugin

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

    (@businessdirectoryplugin)

    Hi John,

    I’m not sure what you mean by “custom fields” here–are you talking about just adding additional fields to the form? Have you looked under Directory Admin->Manage Form Fields? There you can add or change fields as you wish.

    If that’s not right, what kind of custom field are you trying to add here?

    Hi

    I want to add a completely different type of field (one that calculates and confirms the form users’ lat/lon).

    The code to do that I have, but I can’t find a neat way of slotting it into your plugin.

    In views.php (line 496) you call this:

    return wpbdp_render('listing-form-fields', array(
                                'validation_errors' => $validation_errors,
                                'listing_id' => $this->_listing_data['listing_id'],
                                'fields' => $fields,
                                'recaptcha' => $recaptcha
                                ), false);

    …the false preventing any override. That’s fine, but it would be nice to stick a few hooks in your code so that it can be extended.

    All the field types (checkbox, text etc) are hard coded to render.

    I want to do something else (in this case a hidden field with a Google Map).

    JC

    That’s fine, but it would be nice to stick a few hooks in your code so that it can be extended.

    I should have said “That’s understandable” – in my case it’s not fine as I want to override without messing up the plugin!!! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extending Business Directory Plugin’ is closed to new replies.