Support

Account

Home Forums Search Search Results for 'Wysiwyg'

Search Results for 'Wysiwyg'

reply

  • Hey John!

    Thanks for the reply!

    Sure, here’s my acf/save_post code:

    
    function my_post_field_array_save($post_id) {
    	if( have_rows('my_repeater',$post_id) ): 
    		while ( have_rows('my_repeater',$post_id) ) : the_row();
    			remove_filter('acf_the_content', 'wpautop');
    			// remove_filter('acf_the_content', 'do_shortcode'); Could I do something like this?
    			$my_repeater_arr['my_repeater_wysiwyg'] = htmlentities(get_sub_field('my_repeater_wysiwyg',$post_id));
    			add_filter('acf_the_content', 'wpautop');
    		endwhile;
    		update_post_meta($post_id,'my_repeater_meta',$my_repeater_arr);
    	endif;
    };
    add_action('acf/save_post', 'my_post_field_array_save', 20);
    

    Here’s the actual (raw) WYSIWYG content:

    
    [site_url]
    <a href="[site_url]">URL</a>
    

    Here’s the array (no post/save):

    
    array(1) {
      ["my_repeater_wysiwyg"]=>
      string(62) "[site_url]
    <a href="[site_url]">URL</a>"
    }
    

    Here’s the array after (i.e. serialized in the post_meta field…using the pastebin below because this ACF forum converts my HTML entities): http://pastebin.com/iZqffdq1

    Thanks in advance!

    Ryan

  • Like I said, you should open a new ticket on this. $field is passed in the wysiwyg_tinymce_init action and I’d think that Elliot would be probably add it to the wysiwyg_tinymce_settings filter, but the best way for him to get the request is to open a support ticket.

  • ignore the comment that I deleted, I was looking at the wrong hook.

    You can get the field key of the field if that helps you.

    
    acf.add_filter('wysiwyg_tinymce_settings', function( mceInit, id ){
    
      // do something to mceInit
      console.log(id);
      console.log($('#'+id).closest('.acf-field').data('key'));
      
      // return
      return mceInit;
          
    });
    
  • i’m trying to add a class to the ‘body_class’ setting of the tinymce editor before it gets initialized … i need to be able to add custom styles to different WYSIWYG ACF fields and the moment there is no way to differentiate them if there is more than one on a page

    by including the $field i could then add a field specific class to each editor instance

  • Yes, i put in theme file – under this line:

    <?php the_title( ‘<h1 class=”entry-title” ‘ . hybrid_get_attr( ‘entry-title’ ) . ‘>’, ‘</h1>’ ); ?>

    ….. put your code here….

    now for your below comment:

    “From what it looks like you put the code into the “Content” WYSIWYG editor for the page. PHP code cannot be edited there. This is why I gave you the link to the shortcode documentation for ACF.”

    Your understanding is wrong.

    now let me tell you what i did.

    ****

    1. Install ACF
    2. Create Group – check screenshot.
    3. Put your code in single-content.php under the same line that you are talking.
    4. Create new post – new post has option to put the value for subtitle.
    5. I put “This is testing subtitle”
    6. Published the post.

    Now, post has the code as subtitle instead of what i put in subtitle field.

    Please give me correct code, so that i have put on subtitle field that value in the post.

  • The code I gave you was to put in your template file. The template file would located on your site in the theme folder for your theme. In order to use the code you must edit the file.

    From what it looks like you put the code into the “Content” WYSIWYG editor for the page. PHP code cannot be edited there. This is why I gave you the link to the shortcode documentation for ACF.

    At this point I can’t help you because I don’t understand what it is you’re trying to accomplish or where you’re trying to accomplish it. You’ll need to provide more information with a few more details.

  • If all of the data for each field is somehow in the wysiwyg field in some way that it can be axtracted, for example the data for one field is always in a p element with a specific class, and the same of everything else so that it can be reliably extracted, then using something like regular expressions may do it. It would still take a lot of testing and patience. It’s also not something you could run through a browser, it’s something you’d have to set up to run as crons and more than likely you’d have to do it in several passes.

  • Yeah, no. all the info is scattered around the default wysiwyg editor and i have to move it to like 6 different ACF. Just making sure i’m not doing it the dumb way. I thought maybe some regular expressions and programming could help allocate things faster. I think most people that use ACF start the project doing so, they don’t realize they need it 3 years later like me. Sucks for me. Thanks for clarification!

  • What kind of fields are you trying to populate with data from the content?

    Maybe possible if your moving content to a wysiwyg field, but if you’re splitting up your content into multiple fields then the only way to do it will be the hard way.

  • ybdigital, I’m not planning to integrate any modal thingy.
    The way it’s actually working is actually fine for my needs.

    Here’s the main part of my Javascript code, you guys are free to enhance it and share it back 😉

    jQuery(document).ready(function($){
    	// Make sure acf is loaded
    	if (typeof acf == 'undefined'){return;}
    
    	var
    		stylesheet	= '<style type="text/css">\
    							.taz_shortcodeOutput {\
    								background-color: rgb(226, 236, 251)!important;\
    								font-size: 1.4rem!important;\
    							}\
    						</style>',
    		textarea	= '<div class="acf-field acf-field-textarea">\
    							<div class="acf-label">\
    								<label for="taz_shortcodeOutput">Generated Shortcode</label>\
    							</div>\
    							<div class="acf-input">\
    								<textarea class="taz_shortcodeOutput" rows="8"></textarea>\
    							</div>\
    						</div>',
    		triggers	= '.acf-field[data-type=select] select,\
    						.acf-field[data-type=text] input,\
    						.acf-field[data-type=textarea] textarea,\
    						.acf-field[data-type=wysiwyg] textarea,\
    						.acf-field[data-type=number] input,\
    						.acf-field[data-type=radio] input,\
    						.acf-field[data-type=checkbox] .acf-checkbox-list input,\
    						.acf-field[data-type=true_false] .acf-input label input,\
    						.acf-field[data-type=color_picker] .acf-color_picker > input\
    					';
    
    	function taz_buildShortcode(currentLayoutName, triggersElements){
    		var
    			output			= '',
    			content			= '',
    			settingsValue	= {};
    
    		function taz_getSettingsValue(triggersElements){
    			triggersElements.each(function(index, elem){
    				var
    					settingType			= $(elem).parents('.acf-field').data('type'),
    					settingLabel		= $(elem).parents('.acf-field').data('name'),
    					checkboxesValues	= '',
    					isContent			= $(elem).parents('.acf-field').hasClass('taz_isShortcodeContent'); // The "content" is detected by the class "taz_isShortcodeContent"
    
    				if (isContent){
    					settingLabel = 'content';
    				}
    
    				switch(settingType){
    					case 'textarea':
    						settingsValue[settingLabel] = (!isContent) ? encodeURIComponent($(elem).val()) : $(elem).val();
    						break;
    					// Add as many cases you want to handle. Note that depending the type, the way to get values could change.
    					default:
    						break;
    				}
    			});
    			return settingsValue;
    		}
    
    		settingsValue = taz_getSettingsValue(triggersElements);
    		$.each(settingsValue, function(key, value){
    			if (value !== ''){
    				if (key !== 'content'){
    					output += ' ' + key + '="' + value + '"';
    				} else {
    					content = value;
    				}
    			}
    		});
    		output = '[taz_' + currentLayoutName + output + ']' + content + '[/taz_' + currentLayoutName + ']'
    		$('.taz_shortcodeOutput').html(output);
    	}
    
    	/* ================================================== */
    	/* ================================================== Everything starts here */
    	/* ================================================== */
    
    	acf.add_action('append', function($el){ // The user adds a new flexible content
    		var
    			currentLayout		= $el,
    			currentLayoutName	= currentLayout.data('layout'),
    			triggersElements	= null;
    
    		switch(currentLayoutName){
    			case 'shortcode_tester': // Name of the flexible content added
    				if (!$('.taz_shortcodeOutput').length){ // Only prepend once
    					currentLayout.parents('.inside.acf-fields').prepend(textarea);
    					currentLayout.parents('.inside.acf-fields').prepend(stylesheet);
    				}
    				triggersElements = currentLayout.find(triggers);
    
    				triggersElements.on('change keyup', function(){
    					taz_buildShortcode(currentLayoutName, triggersElements);
    				});
    				break;
    			default:
    				break;
    		}
    
    	});
    });
  • After some research and trial and error, here’s what I’ve come up with. For my case it turns out you don’t necessarily need to do anything re the database directly. I used two functions.

    1

    function move_wysiwyg_editor() {
      global $post;
      global $wp_meta_boxes;
      do_meta_boxes(get_current_screen(), 'normal', $post);
      unset($wp_meta_boxes[get_post_type($post)]['normal']);
    }
    add_action('edit_form_after_title', 'move_wysiwyg_editor');

    2

    function remove_plugin_metaboxes() {
      remove_meta_box('id_of_metabox_from_plugin', 'request_form', 'advanced');
      // repeat as needed
    }
    add_action('do_meta_boxes', 'remove_plugin_metaboxes');
  • Adding actions to tinyMCE editors.

    I kept digging and I figured out how to add actions to the editors. This needs to be done only after the editor is added with the new “delay initialization” feature of wysiwyg fields.

    
    jQuery(document).ready(function($){
      
      tinyMCE.on('addEditor', function(e) {
        // fires every time an editor is initialized
        if (typeof(e.editor) == 'undefined' || !e.editor.id.match(/^acf-editor-/)) {
          // not an acf wysiwyg field
          return
        }
        console.log(e.editor); // the editor
        console.log(e.editor.id); // the editor id
        e.editor.on('input', function(ed) {
          // fires on any input to this editor
          // could also use change, blur, focus, etc...
          // you'd want to check the editor ID to match it
          // to only the one you want to add this action to
          console.log('input');
        });
      }); // end tinyMCE.on
      
    }); // end jQuery(document).ready
    
  • I ran into a problem with tinyMCE.activeEditor. Have you tried this with multiple wysiwyg fields on the page? The problem I had is that I was always getting the selected content in the first active editor. For example if you set the first on to text it would always get the content from the second on. If the first on was active then it would always pull the content from there. That’s why in my code above I loop through all the editors and make sure I have the right one by checking the ID.

    If all you have is the one editor then you probably won’t run into the problem.

    I’m actually trying to figure out how to get a change in the editor to trigger an action now and I’m not having much luck either. More than likely I’m going to need to figure out how to add the action to the editor since the textarea field never seems to get updated until you submit the post.

  • 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.

  • Sh*t that is quite long. Longest loads I’m getting is about 15-25s on page with 10-15 flexible content rows each with a WYSIWYG, Image, Link, Repeaters etc – which shows I am impatient more than anything!

    Most of the time savings I was able to achieve by posting the field group changes via AJAX instead of refreshing the whole page (and having to wait for the field groups and other DOM elements to be redrawn every time). Saving request take about 5-10s on average, so after loading the page for the first time, it’s a no-brainer.

    I do agree with you though, you can’t be all things to all clients. If they want the flexibility of creating custom layouts and rows with lots of complex conditional logic happening, then the wait for a minute is more than a reasonable cross to bear for a fool-proof, fully formatted page on the front end.

    Thanks for sharing your insights, it is always helpful to be able to benchmark along the way.

  • I’m not on the fastest internet connection here, currently. My upload speeds suck, so it will effect page load times.

    When I click update, with 100 wysiwyg fields all containing 5 paragraphs from http://lipsum.com/

    First there is the “validation request” (spinning icon next to update). This takes about 15 seconds

    Then there is the actual submission (I can tell when the page is done submitting in firefox and the browser starts to get data back because in the browser tab changes direction and changes color) This takes about another 15 seconds.

    After the page starts loading it is done working after another 10 seconds.

    so the total page load time is about 40 seconds.

    Adding conditional logic on top of this will add additional time, especially if you have a lot of it. Repeaters and flex fields add their own overhead to page’s rendering time. This time may also be effected by the speed of the computer you’re using and how much memory you have available. Where I have a problem with my current internet connection, my computer can make up for it because it brand new and is exceptionally fast and I’ve got RAM to burn.

    Overall, I personally would not consider a 1 minute load time on a page with 100 wysiwyg editors to be slow. It’s not blazing fast, but if someone’s going to add that much information then they should expect it to be a bit slow.

  • You can target specific fields by using something like this

    
    $('.acf-field[data-key="field_0123456"] input[type="email"]')
    

    field_0123456 represents your field key.

    As far as getting the value from the field, every field is going to be a little different. For example, a WYSIWYG field is a standard WP tinyMCE field and you’re going to need to look into how to get the value from that field. Other ACF fields will need to be look at on a one by one basis, but you can target specific fields with actions and to get values using the same basic method that I gave above by using the field keys. Updating other fields in the form is going to be the same as getting values from fields, each one is going to require different code depending on what type of field it is.

    I have some examples of getting values from some types of fields and updating values is some types of fields, but I don’t have them all figured out. You can see my examples here https://github.com/Hube2/acf-dynamic-ajax-select-example.

  • the best information I can give you would be to look at the code where the hook is run in ACF. It appears that these can be altered as well. ACF is basically using core WP hooks to alter the editor buttons.

    Take a look in the file
    advanced-custom-fields-pro/fields/wysiwyg.php starting at about line 120

  • There isn’t any way to directly override the field type used for the default value in ACF, at least not that I can find.

    You could add a new fields setting using https://www.advancedcustomfields.com/resources/adding-custom-settings-fields/. But I don’t know that the WYSIWYG field will actually function on the ACF field group page. You would probably need to load additional scripts in order to get it to work similar to the way extra scripts need to be added to get the image field to work described here https://acfextras.com/default-image-for-image-field/

    If you can add the WYSIWYG field setting and if you can get it to work, you could then use an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acfprepare_field/ to pull the value from the new setting field and put it into the standard ACF default_value for the field.

  • John I just wanted to thank you for all your help with this issue. I think I managed to fix it. Anyone else (unlikely but you never know) with this issue I had a mistake in my acf.php I had “min” and “max” as a child of the sub_fields array when they need to be siblings.

    // so this - WRONG
    ...
    "sub_fields" => array (
    	...
    	array (
    		'tabs' => 'all',
    		'toolbar' => 'full',
    		'media_upload' => 1,
    		'default_value' => '',
    		'delay' => 0,
    		'key' => 'field_5880eb5f6122e',
    		'label' => 'Text',
    		'name' => 'the_text',
    		'type' => 'wysiwyg',
    		'instructions' => '',
    		'required' => 0,
    		'conditional_logic' => 0,
    		'wrapper' => array (
    			'width' => '',
    			'class' => '',
    			'id' => '',
    		),
    	),
    	'min' => '',
    	'max' => '',
    ),
    
    // to this - RIGHT
    ...
    "sub_fields" => array (
    	...
    	array (
    		'tabs' => 'all',
    		'toolbar' => 'full',
    		'media_upload' => 1,
    		'default_value' => '',
    		'delay' => 0,
    		'key' => 'field_5880eb5f6122e',
    		'label' => 'Text',
    		'name' => 'the_text',
    		'type' => 'wysiwyg',
    		'instructions' => '',
    		'required' => 0,
    		'conditional_logic' => 0,
    		'wrapper' => array (
    			'width' => '',
    			'class' => '',
    			'id' => '',
    		),
    	),
    ),
    'min' => '',
    'max' => '',

    VICTORY! Thanks again for all your help!

  • @john thanks for your help this is what I did and it still didn’t not work

    include_once(‘/plugins/advanced-custom-fields/acf.php’);
    define( ‘ACF_LITE’, true );

    if( function_exists(‘register_field_group’) ):

    add_action(‘init’, ‘register_field_group’);
    function register_field_group() {

    register_field_group(array (
    ‘id’ => ‘acf_about-us’,
    ‘title’ => ‘About Us’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_586e22820cdf9’,
    ‘label’ => ‘About Us’,
    ‘name’ => ‘about_us’,
    ‘type’ => ‘text’,
    ‘instructions’ => ‘Enter Title for about us here’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘Enter Title for about us here’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_586e22f80cdfa’,
    ‘label’ => ‘Establised At’,
    ‘name’ => ‘establised_at’,
    ‘type’ => ‘text’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘When where you established’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘page’,
    ‘operator’ => ‘==’,
    ‘value’ => ’15’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘default’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));
    register_field_group(array (
    ‘id’ => ‘acf_food-menu’,
    ‘title’ => ‘Food Menu’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_58808cfded5b3’,
    ‘label’ => ‘Price’,
    ‘name’ => ‘price’,
    ‘type’ => ‘text’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘html’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_5881f02f46739’,
    ‘label’ => ‘Currency’,
    ‘name’ => ‘currency’,
    ‘type’ => ‘select’,
    ‘required’ => 1,
    ‘choices’ => array (
    ‘$’ => ‘$’,
    ‘&euro’ => ‘€’,
    ),
    ‘default_value’ => ”,
    ‘allow_null’ => 0,
    ‘multiple’ => 0,
    ),
    array (
    ‘key’ => ‘field_5880aceb6427c’,
    ‘label’ => ‘Food Category’,
    ‘name’ => ‘food_category’,
    ‘type’ => ‘checkbox’,
    ‘required’ => 1,
    ‘choices’ => array (
    ‘breakfast’ => ‘Breakfast’,
    ‘lunch’ => ‘Lunch’,
    ‘dinner’ => ‘Dinner’,
    ‘party’ => ‘Party’,
    ‘drinks’ => ‘Drinks’,
    ),
    ‘default_value’ => ‘breakfast : Breakfast’,
    ‘layout’ => ‘vertical’,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘post_type’,
    ‘operator’ => ‘==’,
    ‘value’ => ‘foodmenu’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘no_box’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));
    register_field_group(array (
    ‘id’ => ‘acf_footer-details’,
    ‘title’ => ‘Footer details’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_5878f731da3ad’,
    ‘label’ => ‘footer image’,
    ‘name’ => ‘footer_image’,
    ‘type’ => ‘image’,
    ‘instructions’ => ‘Footer Image Goes Here’,
    ‘save_format’ => ‘object’,
    ‘preview_size’ => ‘medium’,
    ‘library’ => ‘all’,
    ),
    array (
    ‘key’ => ‘field_5878f756da3ae’,
    ‘label’ => ‘footer content’,
    ‘name’ => ‘footer_content’,
    ‘type’ => ‘text’,
    ‘instructions’ => ‘footer content goes here’,
    ‘default_value’ => ”,
    ‘placeholder’ => ”,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_58794f98697fa’,
    ‘label’ => ‘Social Icons’,
    ‘name’ => ”,
    ‘type’ => ‘tab’,
    ),
    array (
    ‘key’ => ‘field_58794d05697f8’,
    ‘label’ => ‘Facebook Username’,
    ‘name’ => ‘facebook_username’,
    ‘type’ => ‘text’,
    ‘instructions’ => ‘Enter Your Facebook Username Here’,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘ajbeacon’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_58794c93697f7’,
    ‘label’ => ‘Twitter Username’,
    ‘name’ => ‘twitter_username’,
    ‘type’ => ‘text’,
    ‘instructions’ => ‘Enter Twitter Username Here’,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘ajbeacon’,
    ‘prepend’ => ‘@’,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_58794d65697f9’,
    ‘label’ => ‘Google Plus Username’,
    ‘name’ => ‘google_plus_username’,
    ‘type’ => ‘text’,
    ‘instructions’ => ‘Enter Your Google Plus Username Here’,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘+ajbeacon’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘page’,
    ‘operator’ => ‘==’,
    ‘value’ => ’15’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘default’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));
    register_field_group(array (
    ‘id’ => ‘acf_opening-time’,
    ‘title’ => ‘Opening Time’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_58795883ae60c’,
    ‘label’ => ‘Opening Time’,
    ‘name’ => ”,
    ‘type’ => ‘tab’,
    ),
    array (
    ‘key’ => ‘field_587957a30aecf’,
    ‘label’ => ‘Breakfast’,
    ‘name’ => ‘breakfast’,
    ‘type’ => ‘wysiwyg’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘toolbar’ => ‘full’,
    ‘media_upload’ => ‘yes’,
    ),
    array (
    ‘key’ => ‘field_587957f00aed0’,
    ‘label’ => ‘Lunch’,
    ‘name’ => ‘lunch’,
    ‘type’ => ‘wysiwyg’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘toolbar’ => ‘full’,
    ‘media_upload’ => ‘yes’,
    ),
    array (
    ‘key’ => ‘field_587958310aed1’,
    ‘label’ => ‘Dinner’,
    ‘name’ => ‘dinner’,
    ‘type’ => ‘wysiwyg’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘toolbar’ => ‘full’,
    ‘media_upload’ => ‘yes’,
    ),
    array (
    ‘key’ => ‘field_58795c760f586’,
    ‘label’ => ‘Direction’,
    ‘name’ => ”,
    ‘type’ => ‘tab’,
    ),
    array (
    ‘key’ => ‘field_58795c900f587’,
    ‘label’ => ‘Address’,
    ‘name’ => ‘address’,
    ‘type’ => ‘text’,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘Enter Address Here’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    array (
    ‘key’ => ‘field_58795d8550af4’,
    ‘label’ => ‘Contact Details’,
    ‘name’ => ”,
    ‘type’ => ‘tab’,
    ),
    array (
    ‘key’ => ‘field_58795da950af5’,
    ‘label’ => ‘Email’,
    ‘name’ => ’email’,
    ‘type’ => ’email’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘Enter contact Email Address here’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ),
    array (
    ‘key’ => ‘field_58795dde50af6’,
    ‘label’ => ‘Phone Number’,
    ‘name’ => ‘phone_number’,
    ‘type’ => ‘text’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘Enter Reachable Contact Phone Number Here.’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘html’,
    ‘maxlength’ => ”,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘page’,
    ‘operator’ => ‘==’,
    ‘value’ => ’15’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘default’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));
    register_field_group(array (
    ‘id’ => ‘acf_signature-dishes’,
    ‘title’ => ‘Signature Dishes’,
    ‘fields’ => array (
    array (
    ‘key’ => ‘field_5878ff13d8ea4’,
    ‘label’ => ‘Signature Dishes’,
    ‘name’ => ‘signature_dishes’,
    ‘type’ => ‘text’,
    ‘required’ => 1,
    ‘default_value’ => ”,
    ‘placeholder’ => ‘Enter Title Here Please’,
    ‘prepend’ => ”,
    ‘append’ => ”,
    ‘formatting’ => ‘none’,
    ‘maxlength’ => ”,
    ),
    ),
    ‘location’ => array (
    array (
    array (
    ‘param’ => ‘page’,
    ‘operator’ => ‘==’,
    ‘value’ => ’15’,
    ‘order_no’ => 0,
    ‘group_no’ => 0,
    ),
    ),
    ),
    ‘options’ => array (
    ‘position’ => ‘normal’,
    ‘layout’ => ‘no_box’,
    ‘hide_on_screen’ => array (
    ),
    ),
    ‘menu_order’ => 0,
    ));

    }
    endif;

    or i might doing it wrong

  • Hi,

    We are getting this error too. We just purchased the Pro version and updated our ACF plugin by following the V4 to V5 instructions.

    Our custom field -> field type -> Content -> Image is not recognized, and the “type” column says “Error Field type does not exist”.

    When I create a new field and click on the drop down menu for field type, I see under Content heading:
    Wysiwyg Editor
    oEmbed
    Gallery

    Image is no longer listed on that drop down menu.

    Thanks for any help you can provide!

  • I tested the possible variations, here’s what I got

    Both combinations are working:
    1) With AFC set to textfield and html tags conversion.
    2) With AFC set to textfield and carriage return conversion to <br />.

    3) AFC set to WYSIWYG Editor in any combination not working.

    What works only works with a new blog post set up.
    It is not working when the AFC fields simply get updated after the field setting is changed to reflect the the right setting (1&2).

    Anything I can do to get 850 entries to work upon editing and updating?

  • I just look through the code of ACF4 and any shortcodes added to wysiwyg fields should work without any extra code. I don’t use jetpack, but if these shortcodes work the same as any other wp shortcodes then there should be no reason that they don’t work unless there is something else on the site that’s interfering. I’d say to disable other plugins, but, while I don’t use jetpack, I am familiar with it and there are reasons that I don’t use it.

  • Version 4.4.11

    I switched both, the Acf field and the coding to “textarea” – did not work
    Keeping it at Wysiwyg editor and trying wysiwyg – didn’t work

    I am reading through the documentary on the look out for further options.

Viewing 25 results - 551 through 575 (of 1,298 total)