Home Forums Plugin Support WP User Frontend Pro Post Content TextArea Row set to 5

This topic is: not resolved

This topic contains 7 replies, has 2 voices, and was last updated by  Daryl 3 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #70481

    Daryl
    Member
    Post count: 11

    I wanted the TextArea in Post Content to only have 1 row instead of 5. I changed the row count, but it doesn't seem to take effect.

    Could help me to take a look?

    My site is here at http://ihavoc.com.

    Thanks.

    #70601

    towhid
    Participant
    Post count: 4505

    Hello Daryl,

    I have to discuss about this issue with our developer team. Please allow me some time.

    Thanks

    #70931

    towhid
    Participant
    Post count: 4505

    Hello Daryl,

    Set row count is equal to 1 which means you can will see a closed content area viewing from the vertical. But we do not set this option in here.

    If you set is 1 it will be closed. You can not insert any content in the content area. So the default must be set 5.

    Thanks

    #70965

    Daryl
    Member
    Post count: 11

    This is only just a display in the form. For TextArea, you are supposed to be able to set to any row as shown in this fiddle here:

    http://jsfiddle.net/wv9rykye/

    Please let me know where I can make changes to the code. Change will be minor.

    Thx,

    #71245

    towhid
    Participant
    Post count: 4505

    Hello Daryl,

    Please navigate to plugins/wp-user-frontend-pro/class/render-form.php and find these lines of code.

    $textarea_id = $attr['name']?$attr['name']:'textarea_'.$this->field_count;
                if ( $attr['rich'] == 'yes' ) {
    
                    wp_editor( $value, $textarea_id, array('textarea_rows' => $attr['rows'], 'quicktags' => false, 'media_buttons' => false, 'editor_class' => $req_class) );
    
                } elseif( $attr['rich'] == 'teeny' ) {
    
                    wp_editor( $value, $textarea_id, array('textarea_rows' => $attr['rows'], 'quicktags' => false, 'media_buttons' => false, 'teeny' => true, 'editor_class' => $req_class) );
                } else {
                    ?>
                    <textarea class="textareafield<?php echo $this->required_class( $attr ); ?> <?php echo ' wpuf_'.$attr['name'].'_'.$form_id; ?>" id="<?php echo $attr['name']; ?>" name="<?php echo $attr['name']; ?>" data-required="<?php echo $attr['required'] ?>" data-type="textarea"<?php $this->required_html5( $attr ); ?> placeholder="<?php echo esc_attr( $attr['placeholder'] ); ?>" rows="<?php echo $attr['rows']; ?>" cols="<?php echo $attr['cols']; ?>"><?php echo esc_textarea( $value ) ?></textarea>
                    <span class="wpuf-wordlimit-message wpuf-help"></span>
                <?php }

    Those lines consist of three conditions.

    If the editor set is “Rich” then WordPress default editor will be call up.

    If the editor set is “Teeny” then again WordPress default editor will be call up.

    But, If the editor is set as “Normal” custom text-area will be included.

    Thanks

    #72305

    Daryl
    Member
    Post count: 11

    Interesting, you are right, it doesn't change to 1 row even if I set row=”1″. Your original code should have worked too but somehow it doesn't.

    You guys have any idea why?

    #72438

    towhid
    Participant
    Post count: 4505

    Hello Daryl,

    I think you are missing something. I will request you to hire an experienced developer who will help you to develop this feature.

    Thanks

    #72526

    Daryl
    Member
    Post count: 11

    This was what I did in render-form.php. In the code, I set rows=”1″ as shown below. It seems simple enough, but it doesn't work. What I need is for the post content to display a youtube video. This is a lazier way.

    Will look for a developer when my own lousy skill doesn't work.