Hide Fields in Edit Form

This topic contains 10 reply and 3 voices, and was last updated by Azad 9 years, 6 months ago
Viewing 10 Posts - 1 through 10 (of 10 total)
Author Posts
August 7, 2013 at 3:13 pm 6711
Azad 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
August 8, 2013 at 11:44 pm 6768
Tareq Hasan Tareq Hasan

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.

August 9, 2013 at 1:21 am 6769
Denis Denis

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

August 12, 2013 at 2:26 pm 6875
Denis Denis

How does it work, please help 🙂
Solution 2

Cheers,
Denis

August 12, 2013 at 11:39 pm 6886
Tareq Hasan Tareq Hasan

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]

August 13, 2013 at 12:12 am 6887
Denis Denis

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?

August 13, 2013 at 12:44 am 6889
Tareq Hasan Tareq Hasan

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.

August 13, 2013 at 2:01 am 6900
Denis Denis

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

August 13, 2013 at 2:11 am 6902
Tareq Hasan Tareq Hasan

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.

August 13, 2013 at 11:27 am 6918
Denis Denis

Works!
Thanks

May 31, 2015 at 5:38 pm 45746
Azad Azad

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

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