Brilliant. Thanks.
It’s so easy when you know how! 🙂
Bit of a bummer. I wrote a bunch of SQL statements in the end to remove them. But a bit of a bodge tbh.
Actually, MorningGnu, the creator sent us RC1 of the new version which does support repeater fields. So far it’s been very useful to us and the DB size is much smaller this way than with native ACF table methods. The new form data is stored separately and is easily searchable with our own SQL queries.
They are apparently working on a built in method of porting old records over to the new system which will be of great help although they offer a template to do it yourself.
SOLVED: use ‘author’ instead of ‘post_author’
$args[‘author’] = get_current_user_id();
Hi NickDA,
I went ahead with it. So far it’s been very good and very easy to set up. Apparently the beta version of the new release does support repeater fields and I’m waiting for that to arrive.
Cheers
Fair enough; I’ll find a workaround for this.
Thanks.
PS John, thanks for your User Role Field Setting plugin – very useful!!
Thanks, but unfortunately it doesn’t seem to want to add a field_group alongside a couple of extra fields from another form:
$options = array(
'fields' => array( 'field_5d2870ee42a46', 'field_5d28712c42a47' ),
'field_groups' => array( 926 ),
);
It shows just the two ‘extra’ fields rather than the fields and the field group.
Yes, it’s inside the ready function. I hunted some more and tried various ideas but having an individual focusin for each option is the only way I could find which works.
As I said, it’s not particularly elegant, but it works.
Got to come back to this thread and say, thanks, John!
This pushed my coding skills right to the edge but I got the tinymce to fire on blur which has saved me a LOT of hassle with your code to add an action to the editor.
Thanks again!
Hi John,
Thanks for the suggestion; unfortunately I couldn’t get it to work however.
But I did find a solution. It’s not very elegant and I’m sure there are better ways, but this functions at least:
$('#acf-field_55bf6059da1d8').focusin(function () { alert ("default") });
$('#acf-field_55bf6059da1d8-P').focusin(function () { alert ("default") });
$('#acf-field_55bf6059da1d8-D').focusin(function () { alert ("D") });
$('#acf-field_55bf6059da1d8-NP').focusin(function () { alert ("NP") });
And so on. It means a line for each option of course. And for some reason without specifying the value defaults to the first item.
That’s useful, John. Right now I’ve only got the one editor with no actions (I managed to use actions on other elements instead) so it wasn’t too much of an issue once I’d managed to get/set the contents.
Cheers.
I finally managed it after a long time of searching. And it’s pretty simple.
I can grab the contents of the WYSIWYG field like this:
tinyMCE.activeEditor.getContent( content );
And set them like this:
tinyMCE.activeEditor.setContent( content );
I haven’t managed to get the wysiwyg field to trigger and event but I can work around that.
Also I don’t know how this would work if there were more than 1 wysiwyg field in the form.
Unfortunately that doesn’t work with tinymce because, I believe, it’s in an iFrame.
Thanks, with a tiny bit of tweaking it worked fine!
Hi,
In the end it was getting too complex putting it into columns.
In the end I discovered TABS however, and this seems to work well for the project we have.
Thanks!
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.