Home Forums Plugin Support WP User Frontend (Free Version) Hide Fields in Edit Form

This topic is: resolved

This topic contains 10 replies, has 3 voices, and was last updated by  Azad 3 years, 9 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #6711

    Denis
    Participant
    Post count: 165

    Hello,
    is it possible to hide a field in the edit form page?
    I dont want user to NOT edit a special field.

    Like expire date. this shpuld not be edit able. cause then they dont need to buy new posts ๐Ÿ™‚

    How does that work?

    Denis

    #6768

    Tareq Hasan
    Keymaster
    Post count: 2831

    There are two ways to do it:
    1) you can hide that field with CSS in the edit page (won't work if required field).
    2) Create a different form and assign the other form ID when the post is created.

    #6769

    Denis
    Participant
    Post count: 165

    OK, I need to use solution 2.

    ok, I create a new form for example “6”.

    and now? I only got one EDIT page. How do I say, If this forms (5) content is to be edit use this form (6)?

    A little more help please ๐Ÿ™‚

    Cheers,
    Denis

    #6875

    Denis
    Participant
    Post count: 165

    How does it work, please help ๐Ÿ™‚
    Solution 2

    Cheers,
    Denis

    #6886

    Tareq Hasan
    Keymaster
    Post count: 2831

    Use this sample code

    [php]
    function wpufe_assign_new_form( $post_id, $form_id ) {
    if ( $form_id == ‘5' ) {
    update_post_meta( $post_id, ‘_wpuf_form_id', 6 );
    }
    }

    add_action( ‘wpuf_add_post_after_insert', ‘wpufe_assign_new_form', 10, 2 );
    [/php]

    #6887

    Denis
    Participant
    Post count: 165

    ahh, cool, thanks.

    does this also work for the register form?
    I only want a short registration, but to edit the whole profile.

    will this work the same?

    #6889

    Tareq Hasan
    Keymaster
    Post count: 2831

    Profile update doesn't depend on a form ID. If you insert a profile form in a page, that one will update the user profile.

    #6900

    Denis
    Participant
    Post count: 165

    Yes i know.
    i Need a different Register Form and an other Profil Form.
    Just Register with username, email and password
    And for the Profil i like to have First/lastname, Website, nickname etc.
    How can i do that.
    Cheers,
    Denis

    #6902

    Tareq Hasan
    Keymaster
    Post count: 2831

    Create 2 form:
    1) Registration
    2) Profile Update

    Insert registration form in the “Registration” page and profile update form in a “Profile Update” page. Now try it out.

    #6918

    Denis
    Participant
    Post count: 165

    Works!
    Thanks

    #45746

    Azad
    Member
    Post count: 10

    Hello support team, please help me to install the Dokan. My developer were facing difficulties to install theme.

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

The topic ‘Hide Fields in Edit Form’ is closed to new replies.