diff --git a/modules/filter.module b/modules/filter.module
index 1136a402ab153e419c5594a514074a4bea5721fe..33fd75ed795c0b55b76de7593781251c8d77c6e8 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -794,7 +794,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
  *   HTML for the form element.
  */
 function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents = array('format')) {
-  $format = filter_resolve_format($format);
+  $value = filter_resolve_format($value);
   $formats = filter_formats();
 
   $extra = l(t('More information about formatting options'), 'filter/tips');
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 1136a402ab153e419c5594a514074a4bea5721fe..33fd75ed795c0b55b76de7593781251c8d77c6e8 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -794,7 +794,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
  *   HTML for the form element.
  */
 function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents = array('format')) {
-  $format = filter_resolve_format($format);
+  $value = filter_resolve_format($value);
   $formats = filter_formats();
 
   $extra = l(t('More information about formatting options'), 'filter/tips');