cancel
Showing results for 
Search instead for 
Did you mean: 

Webforms and Metadata

vijay_alfresco
Champ in-the-making
Champ in-the-making
Hi All,

I have created a webform with few text inputs and file upload control, after filling the webform, the text inputs and path to the file are stored in an XML, this is fine and its by design.

Now, when I Click on the Details –> Edit for the file which is uploaded above, I want to get the webform Edit Properties, how can i achieve this.


Please let me know or direct me to a proper links if any

Thanks in advance

Thanks,
Vijay
9 REPLIES 9

mark_smithson
Champ in-the-making
Champ in-the-making
Clicking the "edit" icon (the pencil) when browsing the sandbox works for me.

Are you perhaps clicking somehting else?

vijay_alfresco
Champ in-the-making
Champ in-the-making
Hi mark.smithson,

That gives me the option to edit the file and not the webform, please let me
know how can this be achieved.

Thanks,
Vijay

mark_smithson
Champ in-the-making
Champ in-the-making
I am not sure what is happening for you. Perhaps you could explain what you have done in more detail?

vijay_alfresco
Champ in-the-making
Champ in-the-making
Hi mark.smithson,

Thank you for quick response,

Following are the steps

1. I created a consumer.xsd as follows


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  
   <!– defines the form for creating a career listing –>
   <xs:element name="econsumer-base">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="title" type="xs:normalizedString"/>
            <xs:element name="keywords" type="xs:normalizedString"/>
       <xs:element name="description" type="xs:normalizedString"/>
            <xs:element name="author" type="xs:normalizedString"/>
            <xs:element name="effective_date" type="xs:date"/>
            <xs:element name="expiry_date" type="xs:date"/>      
       <xs:element name="department" type="xs:normalizedString"/>
       <xs:element name="sitename" type="xs:normalizedString"/>
            <xs:element name="content_type" type="xs:normalizedString"/>

            <xs:element name="content" minOccurs="0" maxOccurs="3">
               <xs:complexType>
                  <xs:sequence>
                     <xs:element name="file_Name" type="xs:normalizedString"
                        minOccurs="0"/>
                     <xs:element name="file_path" type="xs:anyURI"/>
                  </xs:sequence>
               </xs:complexType>
            </xs:element>

         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>

2. I Created a webform (test) and attached this .xsd in the
"Data Dictionary -> Web Forms"

3. I then added this webform to my webproject

4. In the SandBox of the webproject, I clicked on "Create –> Web Content Wizard" and added all necessary text boxes and uploaded
the file (say alfresco.pdf) from this form.

5. After completing the wizard I got the test.xml and alfresco.pdf added to
the root folder.

6. Now, when I click on "Edit Properties" for alfresco.pdf I want the webform to be edited again instead of file edit. This happens when i click
on "Edit Properties" of test.xml, i want similar functionality for the file uploaded through the webform, how can i achieve it

Please let me know If this is clear or do you need more details.

Thanks Again

-Vijay

mark_smithson
Champ in-the-making
Champ in-the-making
Hi Vijay,

As far as I am aware there is not an easy way to do this.

Alfresco does not store anything against the uploaded document to indicate that it was uploaded or referenced by a particular web form.

vijay_alfresco
Champ in-the-making
Champ in-the-making
Hi mark.smithson,

OK, but my requirement is to attach certain metadata for a content being uploaded from filesystem in WCM. I cannot achieve this using the "Create" -> "Add Content" form from webproject sandbox as it lists only few properties.

I then tried to build my own Custom Dialog for WCM, but its bit confusing, so left that in middle and started creating webforms and had an option to upload file as one of its field. I know the webforms are used to render (xsd, xsl) and to create dynamic output (jsp, html..) and also I have seen that when we Edit the generated output (jsp, html), it opens up the webform for editing.

The Alfresco CMS has ability to add the metadata (and we can extend) for the content added, but not in WCM.

Thank you very much for your help, please let me know how can I achieve this or provide me some links if you know.

-Vijay

mark_smithson
Champ in-the-making
Champ in-the-making
Hi Vijay,

You may need to think a little differently in WCM 🙂

Would adding the meta data to the web form xml work for you. There is a mechanism to extract meta data from the xml and store it in Alfresco so that you can query it.

What is your use case for this?

Mark

vijay_alfresco
Champ in-the-making
Champ in-the-making
Hi Mark,

Thats fine, but for business users when they upload a file (through webform) they should be able to view or edit the metadata for that file within the sandbox itself.


How to configure the metadata extractions within WCM, I am new to alfresco.

Thanks,
Vijay