I looked at your last few posts, and they are all pretty much concerning the same thing. You can use acf_form to render the entire form. Is there a specific reason you’re trying to re-build the whole form from scratch?
both pages have the same field? or is one page trying to get the image from the other page?
have you tried re-saving those fields on each page?
have you tried using the acf_form() function?
if you’ve set the return value to return an array or object, you can access those values like so:
$video = get_field('video');
$video_url = $video['url'];
$video_thumbnail_url = $video['thumbnail'];
$image = get_field('image');
$image_url = $image['url'];
$image = $image['id'];
You can always view the entire object/array by using var_dump($image);
which field type are you using?
can you post your code
@cchiera i tried what you said and it still selects the first radio button by default.
another option would be to use a select field rather than radio buttons
The validation happens on the front-end, so if you remove the third option via js, then the value of that field will be blank and therefore will not allow the user to pass validation.
I’ve removed and added options after-the-fact before and that has never changed the values of the other entries.
do you have this placed before your header?
acf_form_head();
it should validate via javascript.
If this is for a frontend form, I would create a third option for a default null value, and then remove the third radio button with js. Not ideal, but a workaround until this is addressed.
Change
$page_title = get_field('content_heading')->the_field('content_heading');
to
$page_title = get_field('content_heading');
Also try:
[suhosin]
suhosin.request.max_vars = 1000
suhosin.post.max_vars = 1000
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.