URLPARAM should expand in formfields
I like to define a template-topic with a form which contains an URLPARAM. Every time I enter it within the formfield it disappear.
Test case
I guess the problem is the use of " and % in formfields. Test using $percnt failed.
--
AndreUlrich - 02 May 2004
Hmm, I guess this is an enhancement request. The current spec is to initialize topic text content with URLPARAM and to initialize form content with formfieldname=value parameters.
Do you need to set just part of a form field? Or is setting the whole form field sufficient?
Actually, to be consistent it would be better to implement URLPARAMs also for form fields
--
PeterThoeny - 04 May 2004
I've made a solution that works. I am curious if it is just so simple or that I am missing something.
In Edit.pm, handler
edit, change
$getValuesFromFormTopic = ( ( $formTemplate ) && ( ! $ptext ) );
to:
$getValuesFromFormTopic = ( ( $formTemplate ) && ( ! $ptext ) ) || $templateTopic;
If the topic is created from a template, $getValuesFromFormTopic evaluates as true, so in Form.pm, handler
renderForEdit, the value for the field is lifted from the url parameter.
If the topic is not created from a template, the old boolean comparison is used.
--
ArthurClemens - 16 Sep 2004
You don't need to use URLPARAM, you can just use the name of the field as a parameter in the URL. See
TWikiForms
--
SamHasler - 16 Sep 2004
Ok sorry, the field can be initialized by setting the parameter for it through formfieldname=value . Somehow I didnīt realized this as it seems to me more common to use URLPARAMs for it
I came across that fieldnames with "-" canīt get initialize (for example "Related-Dokuments")
--
AndreUlrich - 29 Dec 2004