Skip Navigation

[Resolved] Cred Post Form displays syntax instead of fields

This support ticket is created 8 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 9 replies, has 2 voices.

Last updated by armandsE 8 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#352287
Screenshot (40).png

The Cred Post Form worked fine until a couple of updates. Now it shows syntax instead of proper inputs.

#352313

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know which CRED version you are using:

Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#352322

The Cred Form broke a month ago...

#352655

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please confirm that you are using [cred-show-group] conditional display with your CRED form.

#352921

Yes, I'm using [cred-show-group] (hidden link):

[cred_show_group if="($(Vakance) ne  '' )"  mode="fade-slide"]
      <div class = "col-sm-6">
        <div class="cred-field cred-field-vards">
          <label class="cred-label">Vārds</label>[cred_field field="vards" post="cv" value="" urlparam=""]
        </div>
      </div>
      <div class = "col-sm-6">
        <div class="cred-field cred-field-uzvards">
          <label class="cred-label">Uzvārds</label>[cred_field field="uzvards" post="cv" value="" urlparam=""]
        </div>
      </div>
      <div class = "col-sm-6">
        <div class="cred-field cred-field-e-pasts">
          <label class="cred-label">E-pasts</label>[cred_field field="e-pasts" post="cv" value="" urlparam=""]
        </div>
      </div>
      <div class = "col-sm-6">
        <div class="cred-field cred-field-telefons">
          <label class="cred-label">Telefons</label>[cred_field field="telefons" post="cv" value="" urlparam=""]
        </div>
      </div>
      <div class = "col-sm-12">
        <div class="cred-field cred-field-pieteikuma-vestule">
          <label class="cred-label">Pieteikuma vēstule</label>[cred_field field="pieteikuma-vestule" post="cv" value="" urlparam=""]
        </div>
      </div>
      <div class = "col-sm-7">
        <div class="cred-field cred-field-pielikums">
          <label class="cred-label">Pievienojamie dokumenti</label>[cred_field field="pielikums" post="cv" value="" urlparam=""]
        </div>
      </div>
      <script type="text/javascript">
        var RecaptchaOptions = {
          theme : 'clean'
        };
      </script>
      <div class="col-sm-5 cred-field cred-field-recaptcha">[cred_field field="recaptcha" value="" urlparam=""]
      </div>
      [cred_field field="form_submit" value="Submit" urlparam=""]
[/cred_show_group]
#353135

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

This is known issue to us and our developers had already fixed the issue, But the fix is under going through the testing process right now. You can expect a new CRED version with fix as soon as possible. I request you to wait a little more.

#353202

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

*** Please make a FULL BACKUP of your database and website.***

We've just released new version of CRED with hotfix 1.4.2.2. Could you please update your CRED plugin to this latest official released version and check it that resolve your issue. You can download latest CRED plugin from:
=> https://toolset.com/account/downloads/

#353229

Fields are displayed fine now. I'm trying to put select options with view, but with no success so far. It also worked with previous versions.

Actual code which works:

[cred_generic_field field="Vakance" type="select" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":0,
"default":[],
"options":[ {"value":"","label":""}, {"value":"Sanitārtehnisko iekārtu montētājs","label":"Sanitārtehnisko iekārtu montētājs"}]
}
[/cred_generic_field]

The previous code which doesn't work now...

[cred_generic_field field="Vakance" type="select" class="" urlparam=""]
{
"required":1,
"validate_format":0,
"persist":0,
"default":[],
"options":[ [wpv-view name="vakances-title"] ]
}
[/cred_generic_field]

The

[wpv-view name="vakances-title"] 

output is: {"value":"","label":""}, {"value":"Sanitārtehnisko iekārtu montētājs","label":"Sanitārtehnisko iekārtu montētājs"}

#353232

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please try to add following code to your current theme's functions.php file.

add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );

function prefix_clean_view_output( $out, $id ) {
    if ( $id == '375' ) {
        $start = strpos( $out, '<!-- wpv-loop-start -->' );
        if ( 
            $start !== false
            && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
        ) {
            $start = $start + strlen( '<!-- wpv-loop-start -->' );
            $out = substr( $out , $start );
            $end = strrpos( $out, '<!-- wpv-loop-end -->' );
            $out = substr( $out, 0, $end );
        }
    }
    return $out;
}

Where replace "375" with your original view ID.

#353236

Thank you! It works now as expected!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.