This patch adds an aditional formfield option "default noparse". This can be used if the default value should not be parsed first, e.g. when used with the Substitutor Extension.
This also makes sense for multiple instance templates, where the default value for new instances is just copied and not recalculated. If you want unique ID's for each new instance, this mechanism wouldn't work.
(I've tested this patch with single instance templates, multiple instance template still seem broken at the moment, see T125377
patch index 6c3a18d..f79356d 100644 --- a/includes/SF_FormField.php +++ b/includes/SF_FormField.php @@ -219,6 +219,8 @@ class SFFormField { // wikitext in the value, and bare URLs, // will not get turned into HTML. $f->mDefaultValue = $wgParser->recursivePreprocess( $sub_components[1] ); + } elseif ( $sub_components[0] == 'default noparse' ) { + $f->mDefaultValue = $sub_components[1]; } elseif ( $sub_components[0] == 'preload' ) { $f->mPreloadPage = $sub_components[1]; } elseif ( $sub_components[0] == 'show on select' ) { @@ -332,7 +334,7 @@ class SFFormField { } // If we're using Cargo, there's no equivalent for "values from - // property" - instead, we just always get the values if a + // property" - instead, we just always get the values if a // field and table have been specified. if ( is_null( $f->mPossibleValues ) && defined( 'CARGO_VERSION' ) && $cargo_table != null && $cargo_field != null ) { // We only want the non-null values. Ideally this could