Home Forums Plugin Support WP User Frontend Pro Add default date into date field?

This topic is: not resolved

Tagged: 

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #70498

    O Park
    Member
    Post count: 44

    I have a date field on my front-end form and want to have default date and time loaded when page loads.

    How do I do this?

    Thank you!

    #70658

    towhid
    Participant
    Post count: 4505

    Hello Park,

    Please navigate to wp-user-frontend-pro/includes/pro/render-form.php and find and remove this line

    value="<?php echo esc_attr( $value ) ?>" size="30" />

    and replace the below line instead of the previous line.

    value="<?php echo esc_attr( date('l jS F Y') ) ?>" size="30" />

    Thanks

    #71075

    O Park
    Member
    Post count: 44

    Hi,
    Thank you for the response. This sets the default date in the field but it always stays at the default date. Selecting different date does not override default date in the field.

    This does not work. How do I fix this?

    #71638

    towhid
    Participant
    Post count: 4505

    Hello Park,

    Step: 1 Please navigate to wp-user-frontend-pro/includes/pro/render-form.php

    Step 2: Rename this file render-form.php to render-form-backup.php

    Step 3: Download new render-form.php file from this link https://www.dropbox.com/s/35ez7fooiabbytw/render-form.php?dl=0

    Step 4: Paste this file render-form.php in this location wp-user-frontend-pro/includes/pro/

    Hope it will meet with your requirements. If you still need any assistance please let me know.

    Thanks

    #71665

    O Park
    Member
    Post count: 44

    That did not work. Please see https://wedevs.com/support/topic/date-field-not-working-2/ for future assistance.
    I guess what I want is that. Removing Date field from the custom fields and add it back to post option( where is used to be on previous version)

    #71836

    towhid
    Participant
    Post count: 4505

    Please provide your login details by using this form: http://wedevs.com/provide-login-details/. I will have a look what is going wrong.

    Thank you ๐Ÿ™‚

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

The topic ‘Add default date into date field?’ is closed to new replies.