• I just updated to types 1.2 and the types raw seems to not work anymore. It actually calls the WPCF_Field->html function every-time even though I pass the data as such:

    types_render_field(“my-field”, array(“raw” => “true”))

    The html functions calls do_shortcut which cause issues if your trying to get the data raw…

    Has anyone else seen this issue? Is this new desired behavior? How can I get the data truly raw without having do_shortcut process the results?



Viewing 6 replies - 1 through 6 (of 6 total)
  • So my custom fix to get this back working the way it did pre version 1.2 was to add the following lines to frontend.php at the bottom of the
    types_render_field method:

    // API filter
    $wpcf->field->set( $post, $field );
    if ( isset( $params['raw'] ) && $params['raw'] == 'true' ) {
    	return $html;
    } else {
    	return $wpcf->field->html( $html );

    Here is another fix if your trying to store numeric values of zero. Before 1.2 I was able to store numeric types of “0”. Since the upgrade this is not possible since the empty function will by-pass “0”.



    if ( !empty( $value ) ) {
    if ( !empty( $value ) || is_numeric($value))

    Hope this helps others!

    You’re right, some part of code is reviewed and not working same as before.

    1. We enabled do_shortcode support when ‘raw’ is TRUE. Do you think it should be enabled only for WYSIWYG ield type in RAW mode?

    2. Do you suggest to allow writing 0 value for Numeric field?

    Hi Srdjan,

    Thanks for getting back…

    1. I think raw should really mean raw it should have no other processing added to it. By pre-processing it with other filters and functions it really isn’t raw. When I think of raw from the DB I should get back pretty much what I would get from a SELECT statement and nothing else…

    2. Zero by definition is a “Whole Number” so it should be included in any numeric definition.

    I think by bringing back the pre 1.2 changes the definitions of your API will be much more accurate, right now they will lead to further help-desk tickets in the future. I also know with every update that is released that I will have to go back and update these files as this is how I have already built out a rather large site using Types…


    Fixes are added for next release for both issues.

    Awesome! Looking forward to it…

    Thanks Srdjan!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom Type Raw’ is closed to new replies.