• Resolved dotdoc

    (@dotdoc)


    Geodirectory has:

    ../includes/custom-fields/functions.php:

    $html = apply_filters( "geodir_custom_field_output_{$field_type}", $html, $fields_location, $type );

    This gives the opportunity to filter html output of textarea’s with ‘geodir_custom_field_output_textarea’. In this case to limit the word count of textarea’s and add a ‘Read more…’ jQuery link, like:

        $html = "
    <div class='geodir-textarea-expandable'>
    <div class='geodir-textarea-content'>
    <span class='geodir-textarea-preview'>$content</span>
    <span class='geodir-textarea-full' style='display: none;'> $full_content </span>
    </div>
    <a href='#' class='gd-readmore'>Read more...</a>
    </div>
    ";

    return $html;

    Is there a hook like that in UsersWP, that will let me filter the $html output of a custom field textarea in the same way? If not, could you consider adding it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support alexrollin

    (@alexrollin)

    Hello,

    Yes, UsersWP has similar filters

    First you can target a specific field using the key like

    uwp_form_input_textarea_{$field->htmlvar_name}

    If you want to target all text area inputs then you can check

    uwp_form_input_html_textarea

    Let us know if that’s what you were looking for ??

    Thread Starter dotdoc

    (@dotdoc)

    It seems like this is a filter for the input fields.
    Should it work for the output/display also?
    Or is there a different filter for that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.