Closed lucianahanan closed 2 years ago
Can you post the code you were using to do this? What content type? Custom Post Type or Advanced Content Type?
create new ACT, add some fields. define hide author from ui, and author default value = 2 put [form] shortcode in a normal page. see form source, there is an input hidden for author, but it has no value="2" as expected. fill form and send author field remains blank in database
@YammYcoding What is your shortcode?
[pods name="test" form="1"]
Created a new ACT, added a foo text field and saved. Installed 2.5.2 beta 1 today. Still same behavior.
WITH USER LOGGED IN Test: include a test pod, with author showing in form, with default value ( user id )
new record saved, author correct.
Test: include a test pod, with author hiding from ui, with default value ( user id )
new record saved, empty value in author. <<<< problem
Test: include a test pod, with author showing in form, with default value = 1
new record saved, author 1 is correct.
Test: include a test pod, with author hiding from ui, with default value = 1
new record saved, author 1 is correct.
WITH USER NOT LOGGED IN Test: include a test pod, with author showing in form
No record saved. Error: Access denied, please refresh and try again. <<<< problem
Test: include a test pod, with author hiding from ui
No record saved. Error: Access denied, please refresh and try again. <<<< problem
Can you clarify which option you're using to hide the field?
[x] Advanced > Hide field from ui
Possibly could be the same bug as in #2610 or similar.
this 2610 seems something else, mine is specific about the author hide from ui things =)
the access denied otherwise, seems to be related to the restriction on guest users that cannot post to wp normally.
Defined author field as hidden from ui, with a default value ( 2 ). But when saving from form, the input hidden of author doesn't have any vallue, and when the form is saved, the field remains empty in database.