multipart/form-data is handled differently from regular forms, if you are triggering a service event on form submission then the parameters from this type of form can be retrieved using:
${parameters.multiPartMap.USER_FIRST_NAME}

If you aren't using a service event first then you'll have to handle it manually using ServiceEventHandler.java code as an example.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 6/11/2009, at 3:09 PM, S.Hage wrote:


Hi All,

I have a very big FORM (.ftl) with many inputs, among them I have one
"<input type="file"> for uploading an image file, for this reason I set the enctype of the form to "multipart/form-data". The values of the inputs look
like this:


<table cellspacing="0" id="tbl" name="tbl">
 <tr>
  <td class="label">${uiLabelMap.PartyFirstName}</td>
  <td><input type="text" class="required" id="USER_FIRST_NAME "
name="USER_FIRST_NAME " size="30" maxlength="60"
      <#if requestParameters.USER_FIRST_NAME?has_content>
         value="${requestParameters.USER_FIRST_NAME}"
      </#if>
  />${uiLabelMap.CommonRequired}
  </td>
 </tr>
…..
ETC..

The problem is when  enctype equal to "multipart/form-data" the <#if
requestParameters.USER_FIRST_NAME?has_content> return null even if
requestParameters.USER_FIRST_NAME has content. If I remove the enctype then
everything is Ok and the values take the value of
requestParameters.USER_FIRST_NAME.

I believe that the problem is directly related to the
enctype="multipart/form-data" but I don’t know how I can get rid from this
situation.

Any explanation?

Thanks in advance.

S.Hage

--
View this message in context: 
http://n4.nabble.com/enctype-multipart-form-data-and-POST-method-tp547633p547633.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to