Home Forums Plugin Support WP User Frontend (Free Version) Hide field if no value inserted

This topic is: resolved

This topic contains 9 replies, has 3 voices, and was last updated by  Tareq Hasan 5 years, 4 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #14715

    David
    Member
    Post count: 12

    Hi,
    So I have a question I want to insert multiple fields in a custom form this way:
    1. I will have required fields
    2. I will have non required fields.
    My question is, what do I have to do in order to hide a custom field that is not required if no value is inserted in the form.
    Example is this page:
    http://sftesting.net/rick/test-12-17/
    I have no required fields with no value in them but they are displayed. – (I want to hide the non required fields that no value will be inserted.)

    Thank you I will wait for your reply.

    #14860

    David
    Member
    Post count: 12

    Anybody that knows how to do this>?

    #14862

    Mahi
    Member
    Post count: 1555

    Hello,

    There are two option.

    1. By editing plugin file, Check solution here: http://wedevs.com/support/topic/hide-meta-fields-that-are-not-filled/#post-10262

    2. By using ACF plugin.

    #14865

    David
    Member
    Post count: 12

    OK so I did what it was mentioned on this link:
    http://wedevs.com/support/topic/hide-meta-fields-that-are-not-filled/#post-10262
    but is still not hiding the custom fields.
    Here is the location of my form:
    http://sftesting.net/rick/submit-your-business/

    Here is the link to the published post:
    http://sftesting.net/rick/testing-deal-123/
    as you can see I did not insert any value in
    Website URL:
    Facebook URL:
    Yelp URL:
    Twitter URL:
    Instagram URL:
    Attachment Images:
    And the name of the field is still getting displayed on the posting page.

    You told me about number 2 but I don't know what do I have to do with that. I did installed that plugin but what do I have to do next?

    #15048

    David
    Member
    Post count: 12

    I am still waiting for a solution. Is there a way to hide text fields that are not filled out?, is there a way to make the entire field dissapear?

    Thank you I will wait for a replay. I hope I will get a working solution.

    #15050

    Mahi
    Member
    Post count: 1555

    Sorry for being late. Can you share your login details?
    Please provide your site url, user login and password so we can check it. Also mark your reply as Private reply to keep it safe.

    #15051

    David
    Member
    Post count: 12
    This reply has been marked as private.
    #15089

    Tareq Hasan
    Keymaster
    Post count: 2831

    I've updated a line, check if it works.

    #15091

    David
    Member
    Post count: 12

    Can you please tell me what did you had to change because I have another website where I have the plugin installed and I need to update that one to. what is the line that you have updated?

    Thank you.

    #15094

    Tareq Hasan
    Keymaster
    Post count: 2831

    Just change if ( $value ) { to if ( $value[0] ) {.

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

The topic ‘Hide field if no value inserted’ is closed to new replies.