%FORMFIELD{"ProjectName" topic="WEB.TOPIC" alttext="Field doesnt found"}%
but it always displays alternative text, so it doesn't seems to find that field.
What should I do?
I've tried using javascript and it worked. It's quite simple! I've included a javascript function
function canSubmit(inForm)
which is called from the "onSubmit" parameter in the HTML form. I've defined some variables to get the content from the fields:
var inputProjectName = inForm.ProjectName.value;
...
and the i've defined the action here, with the javascript code, better than with de action parameter from the HTML form. This way, I can mix the variables from javascript and twiki:
inForm.action="%SCRIPTURLPATH{edit}%/%BASEWEB%/"+inputProjectName + "%GMTIME{$mo$day$year$hour$min$sec}";
This function is called when pressing the "submit" button and redirects the user to the edit view of a new topic with a name like this
ProjectName05302007081843
-- RaquelAlegre - 30 May 2007
Related support topics on formfields: AttachURLDoesntWorkInFormField, BatchEditFormFieldValue, CanAFormFieldGetDataFromTheTopic, DateFieldPluginFormFieldIsEditable, DeepRecursionUsingFormfieldInForm, DisplayFormFieldinTopic, DisplayFormfieldBasedOnTopicName, DisplayTopicsBasedOnFormFieldSearch, EvalVariableInFormfield, FormFieldValueInMailNotify, FormFieldValuesInsideTopic, FormFieldsInExternalLinks, FormFieldsNotCompletelyFilled, FormatDataFromFormFieldCheckboxType, FormfieldEmptyInFormattedSearch, FormfieldTextareaSearchNotTruncatedProperly, HiddenMandatoryFormFieldsNotHidden, HowToCreateTopicNameFromFormField, HowToEditFormFieldDataInBodyOfText, HowToEditFormfieldsWithoutEdit, HowToInitialiseFormFields, HowToMetaSearchMultipleFormFields, HowToSearchBasedonFormFieldContents, HowToSearchForFORMFIELD, HowToSearchForTopicNameInFormField, HowToSearchFormFields, HowToSearchFormFields2, HowToSortSearchByDateFormField, HowToUpdateFormFieldValuesWithSearches, HowToUseFormfieldInIFCondition, HowToUseParentFORMFIELDInINCLUDE, InternationalCharactersInFormFields, METAformfieldDisplayBroken, MultipleDateValueFormfield, PreventRenderingOfHtmlFormFields, ProbleminGettingFormField, RenderFormfieldsInText, SEARCHFailWithFormFieldAfterUpgradeTo01Sep2004, SearchBasedOnDateFormfield, SearchForFormfieldsWithVar, SearchFormatFormField, SearchOnTwoOrMoreFormFields, SearchResultOrderedByFormfield, StoreFormFieldMetaFromPlugin, TemplatesAndFORMFIELDS, UrlParamInFormField, UseAFormFieldDateToSortAList, UsingMetaParentWithFormFields, VarOrCalcInsideFormfieldInsideIf, VariableInFormField
-- PeterThoeny - 30 May 2007