cool, i will check it. Thanks John 🙂
It is not Godaddy, I use other server. It is something with “links” field type URL and option page. I did tests with others format field types and works fine.
I have constantly tested it. This occurs only when using the field type Url and options page. In other fields gave no error. I tested with WordPress Version 4.6.1 and ACF PRO Version 5.4.4. No other plugin installed.
same problem here. Repeater with url field. Someone figured out how to solve this problem?
I thank Idealien, your solution served as the basis of my code.
Ok Guys, my solution:
function my_acf_admin_head() {
global $post_type;
if( 'midias_type' == $post_type ) : ?>
<script type="text/javascript">
(function($){
acf.add_action('ready', function( $el ){
var container = $('.acf-field');
var $field = $('.acf-checkbox-list input');
container.each(function ( index) {
if(!$(this).hasClass('acf-field-taxonomy')) {
$(this).addClass("hidden-by-conditional-logic");
}
});
$field.on('click', function (evt) {
var ele = $(this).val();
container.removeClass('hidden-by-conditional-logic');
if(ele == '53') {
$('[data-name="arquivo"]')
.siblings(':not(.acf-field-taxonomy,[data-name="capa"])')
.addClass('hidden-by-conditional-logic');
} else if(ele == 52) {
$('[data-name="fotos"]')
.siblings(':not(.acf-field-taxonomy)')
.addClass('hidden-by-conditional-logic');
} else if(ele == 51) {
$('[data-name="video"]')
.siblings(':not(.acf-field-taxonomy,.acf-field-text)')
.addClass('hidden-by-conditional-logic');
}
});
$('input[type="radio"]:checked' ).click();
});
})(jQuery);
</script>
<?php endif;
}
add_action('acf/input/admin_head', 'my_acf_admin_head');
+1 vote 🙂
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.