Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hallo @haet,

    ich stehe aktuell wieder vor dem gleichem Problem mit den Pflichtfeldern, hat sich da mittlerweile eine L?sung finden lassen? W?re super, wenn die in CleverReach definierten Pflichtfelder erkannt werden.

    Lieben Gru?
    Christopher

    Thread Starter ckrah

    (@ckrah)

    Hi Sven,
    yes i have registered the additional form fields before i find this Plugin but it doesn’t work.

    But i wil try the my_custom_cleverreach_form() – function. Thanks!

    Thread Starter ckrah

    (@ckrah)

    I have resolved the Problem quick&dirty in /plugins/cleverreach-extension/public/class-cre-public.php:

    // Populate"$post_attr" (array) according to CleverReach API defaults.
    			foreach ( $post as $key => $value ) {
    				
    				if($key==1061360){
    					$key="Anrede";
    				}
    				if($key==1061358){
    					$key="Vorname";
    				}
    				if($key==1061359){
    					$key="Nachname";
    				}
    
    				if ( "email" != $key ) { // Skip "email" as this is not needed as separate attribute.
    					array_push(
    						$post_attr,
    						array(
    							"key"   => sanitize_html_class( $key ),
    							// Attribute "$key" may only contain lowercase a-z and 0-9. Everything else will be converted to "_".
    					        "value" => sanitize_text_field( $value )
    						)
    					);
    				}
    
    			}

    I dont know why, but i think the cleverreach Api has changed the method to send values.

    If i changed the field-names like “1061358” to “Vorname” as a POST-Name it works.

    Maybe @hofmannsven can fix this ??

    • This reply was modified 8 years, 3 months ago by ckrah.
    • This reply was modified 8 years, 3 months ago by ckrah.
    Thread Starter ckrah

    (@ckrah)

    Additional Informations:

    PHP-Version: 5.6 Stable
    Wordpress-Version: 4.7

Viewing 4 replies - 1 through 4 (of 4 total)