Thank you David, I appappreciate your tip with the php-file.
That part is nearly done.
/**
* Changes for Gravity-Forms
* (c) 2012 Hartmut Schöpke, Xiega UG, Dortmund,
*
* german adress format
*/
add_filter("gform_address_types", "german_address", 10, 2);
function german_address($address_types, $form_id){
$address_types["german"] = array(
"label" => "deutsch",
"country" => "Deutschland",
"zip_label" => "PLZ",
"state_label" => "Bundesland",
"states" => array("", "Baden-Württemberg", "Bayern", "Berlin", "Brandenburg", "Bremen", "Hamburg", "Hessen", "Mecklenburg-Vorpommern", "Niedersachsen", "Nordrhein-Westfalen", "Rheinland-Pfalz", "Saarland", "Sachsen", "Sachsen-Anhalt", "Schleswig-Holstein", "Thüringen")
);
return $address_types;
}
add_filter("gform_address_street", "change_address_street", 10, 2);
function change_address_street($label, $form_id){
return "Straße";
}
add_filter("gform_address_display_format", "address_format");
function address_format($format){
return "zip_before_city";
}
---
I've got difficulties with the css-part.
First I've included the css below all other in the WP-Thems css file; but It shows no effect.
Then I traced it in firebug and oh, what a miracle. the css file /plugins/gravityforms/css/forms.css is the last in order of the cascade.
Then I put the new css-parts there and It works.
/**
* Chnages for gravity forms
* (c) 2012 Hartmut Schöpke, Xiega UG, Dortmund
*
* formular design for zip and city as customary in germany
*/
.gform_wrapper .ginput_complex #input_1_3_5_container {
width: 30%;
}
.gform_wrapper .gfield_error .ginput_complex #input_1_3_5_container {
width: 30%;
}
.gform_wrapper .ginput_complex #input_1_3_3_container {
width: 69%;
}
.gform_wrapper .gfield_error .ginput_complex #input_1_3_3_container {
width: 69%;
}
But now I think I've got an Problem again with auto updates.
Possible the Problem is because I use the WP4FB plugin? The three gravity styles (I've got in preview) aren't in the wp4fb-page (page for a facebook-app). To get nearly the same result I must include all of the forms.css-code on top of the wp4fb.css.
Unfortunately the css-parts for my address fields have no effect in that file (neither, between form and wp4fb parts, nor at the end) because the forms.css in /plugins/gravityforms override the style.
Is there any possibility to solve the problem with auto-update (or doesn't the update overwrite that file?).
Until I've solved the problem you could find an Example of the generated form here.
Posted 12 years ago on Wednesday August 15, 2012 |
Permalink