diff --git a/package-lock.json b/package-lock.json
index 13fe0ad27babe0c00e6da9bb92488d77468f208d..4c7d4b0c0a26c5060ede383834ba79b04cedf45c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2062,6 +2062,37 @@
       "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
       "dev": true
     },
+    "axios": {
+      "version": "0.19.2",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
+      "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
+      "requires": {
+        "follow-redirects": "1.5.10"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "follow-redirects": {
+          "version": "1.5.10",
+          "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
+          "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
+          "requires": {
+            "debug": "=3.1.0"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+        }
+      }
+    },
     "babel-code-frame": {
       "version": "6.26.0",
       "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@@ -2184,8 +2215,7 @@
     "balanced-match": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
-      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
-      "dev": true
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
     },
     "base": {
       "version": "0.11.2",
@@ -2377,7 +2407,6 @@
       "version": "1.1.11",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
-      "dev": true,
       "requires": {
         "balanced-match": "^1.0.0",
         "concat-map": "0.0.1"
@@ -2839,6 +2868,15 @@
         }
       }
     },
+    "cli": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
+      "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=",
+      "requires": {
+        "exit": "0.1.2",
+        "glob": "^7.1.1"
+      }
+    },
     "cli-cursor": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
@@ -3198,8 +3236,7 @@
     "concat-map": {
       "version": "0.0.1",
       "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
-      "dev": true
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
     },
     "concat-stream": {
       "version": "1.6.2",
@@ -3223,7 +3260,6 @@
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
       "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
-      "dev": true,
       "requires": {
         "date-now": "^0.1.4"
       }
@@ -3455,8 +3491,7 @@
     "core-util-is": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
-      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
-      "dev": true
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
     },
     "cosmiconfig": {
       "version": "5.2.1",
@@ -3825,8 +3860,7 @@
     "date-now": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
-      "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
-      "dev": true
+      "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs="
     },
     "de-indent": {
       "version": "1.0.2",
@@ -4094,7 +4128,6 @@
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
       "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
-      "dev": true,
       "requires": {
         "domelementtype": "^1.3.0",
         "entities": "^1.1.1"
@@ -4109,8 +4142,7 @@
     "domelementtype": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
-      "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
-      "dev": true
+      "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
     },
     "domhandler": {
       "version": "2.4.2",
@@ -4260,8 +4292,7 @@
     "entities": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
-      "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
-      "dev": true
+      "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w=="
     },
     "errno": {
       "version": "0.1.7",
@@ -4769,6 +4800,11 @@
         "strip-eof": "^1.0.0"
       }
     },
+    "exit": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+      "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw="
+    },
     "expand-brackets": {
       "version": "2.1.4",
       "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
@@ -5326,8 +5362,7 @@
     "fs.realpath": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
-      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
-      "dev": true
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
     },
     "fsevents": {
       "version": "1.2.9",
@@ -5923,7 +5958,6 @@
       "version": "7.1.3",
       "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
       "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
-      "dev": true,
       "requires": {
         "fs.realpath": "^1.0.0",
         "inflight": "^1.0.4",
@@ -6497,7 +6531,6 @@
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
       "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
-      "dev": true,
       "requires": {
         "once": "^1.3.0",
         "wrappy": "1"
@@ -6506,8 +6539,7 @@
     "inherits": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
-      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
-      "dev": true
+      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
     },
     "inquirer": {
       "version": "3.3.0",
@@ -6948,6 +6980,83 @@
       "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
       "dev": true
     },
+    "jshint": {
+      "version": "2.11.0",
+      "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.0.tgz",
+      "integrity": "sha512-ooaD/hrBPhu35xXW4gn+o3SOuzht73gdBuffgJzrZBJZPGgGiiTvJEgTyxFvBO2nz0+X1G6etF8SzUODTlLY6Q==",
+      "requires": {
+        "cli": "~1.0.0",
+        "console-browserify": "1.1.x",
+        "exit": "0.1.x",
+        "htmlparser2": "3.8.x",
+        "lodash": "~4.17.11",
+        "minimatch": "~3.0.2",
+        "shelljs": "0.3.x",
+        "strip-json-comments": "1.0.x"
+      },
+      "dependencies": {
+        "domhandler": {
+          "version": "2.3.0",
+          "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
+          "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=",
+          "requires": {
+            "domelementtype": "1"
+          }
+        },
+        "domutils": {
+          "version": "1.5.1",
+          "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
+          "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
+          "requires": {
+            "dom-serializer": "0",
+            "domelementtype": "1"
+          }
+        },
+        "entities": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
+          "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
+        },
+        "htmlparser2": {
+          "version": "3.8.3",
+          "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
+          "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
+          "requires": {
+            "domelementtype": "1",
+            "domhandler": "2.3",
+            "domutils": "1.5",
+            "entities": "1.0",
+            "readable-stream": "1.1"
+          }
+        },
+        "isarray": {
+          "version": "0.0.1",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+        },
+        "readable-stream": {
+          "version": "1.1.14",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+          "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.1",
+            "isarray": "0.0.1",
+            "string_decoder": "~0.10.x"
+          }
+        },
+        "string_decoder": {
+          "version": "0.10.31",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+        },
+        "strip-json-comments": {
+          "version": "1.0.4",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+          "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E="
+        }
+      }
+    },
     "json-parse-better-errors": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
@@ -7159,8 +7268,7 @@
     "lodash": {
       "version": "4.17.11",
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
-      "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
-      "dev": true
+      "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
     },
     "lodash.clonedeep": {
       "version": "4.5.0",
@@ -7474,7 +7582,6 @@
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
       "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
-      "dev": true,
       "requires": {
         "brace-expansion": "^1.1.7"
       }
@@ -7915,7 +8022,6 @@
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
       "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
-      "dev": true,
       "requires": {
         "wrappy": "1"
       }
@@ -8204,8 +8310,7 @@
     "path-is-absolute": {
       "version": "1.0.1",
       "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
-      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
-      "dev": true
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
     },
     "path-is-inside": {
       "version": "1.0.2",
@@ -9827,6 +9932,11 @@
         "jsonify": "~0.0.0"
       }
     },
+    "shelljs": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
+      "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E="
+    },
     "signal-exit": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@@ -11323,6 +11433,11 @@
       "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
       "dev": true
     },
+    "vue-the-mask": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/vue-the-mask/-/vue-the-mask-0.11.1.tgz",
+      "integrity": "sha512-UquSfnSWejD0zAfcD+3jJ1chUAkOAyoxya9Lxh9acCRtrlmGcAIvd0cQYraWqKenbuZJUdum+S174atv2AuEHQ=="
+    },
     "vuetify": {
       "version": "1.5.16",
       "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.16.tgz",
@@ -11770,8 +11885,7 @@
     "wrappy": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
-      "dev": true
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
     },
     "write": {
       "version": "0.2.1",
diff --git a/package.json b/package.json
index 73c82be2227f35aff1cd11b513ec2934cf610aec..f919a651a10a7ba2cf497dd1d34e883252ff7351 100644
--- a/package.json
+++ b/package.json
@@ -17,13 +17,16 @@
     "*.js"
   ],
   "dependencies": {
+    "axios": "^0.19.2",
     "base-64": "^0.1.0",
+    "jshint": "^2.11.0",
     "moment": "^2.24.0",
     "vue": "^2.6.10",
     "vue-i18n": "^8.11.2",
     "vue-json-pretty": "^1.6.0",
     "vue-router": "^3.0.7",
     "vue-slicksort": "^1.1.3",
+    "vue-the-mask": "^0.11.1",
     "vuetify": "^1.5.16",
     "vuex": "^3.1.1"
   },
diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json
new file mode 100644
index 0000000000000000000000000000000000000000..5253fe257b57df66faa70a4bbe777116660308a0
--- /dev/null
+++ b/src/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+    "vetur.format.defaultFormatterOptions": {},
+}
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 6dae0a5c570e8686824082dfb81197dda889178c..f9257bbb344bedd3e13e46fe2087cb777a954843 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -90,15 +90,17 @@
           >
             <v-tab ripple>{{ $t('Submit') }}</v-tab>
             <v-tab ripple>{{ $t('Display') }}</v-tab>
-            <v-tab ripple>{{ $t('Edit') }}</v-tab>
-            <v-tab ripple>{{ $t('Search') }}</v-tab>
+          <!--  <v-tab ripple>{{ $t('Edit') }}</v-tab>
+            <v-tab ripple>{{ $t('Search') }}</v-tab>-->
           </v-tabs>
 
           <v-layout row>
             <v-flex>
               <v-window v-model="window">
                 <v-window-item>
-                  <ph-submit
+                 
+                  <ph-submit 
+                  :model="contentmodel"
                     :form="form"
                     v-on:object-created="objectCreated($event)"
                     v-on:load-form="form = $event"
@@ -120,18 +122,52 @@
                           single-line
                           class="right"
                           color="primary lighten-2"
-                          @click="loadDisplay()"
+                          @click="getPid();loadDisplay();"
                         >Load</v-btn>
                       </v-toolbar>
                       <v-card-text>
                         <v-layout row>
-                          <ph-d-jsonld :jsonld="displayjsonld" :pid="pid"></ph-d-jsonld>
+                     
+                          <ph-d-jsonld :form="form"  :jsonld="displayjsonld" :pid="pid"></ph-d-jsonld>
+                          
                         </v-layout>
+              <v-layout row>          
+           <v-toolbar v-if="members.length>0" dense flat>
+              
+                <v-toolbar-title class="font-weight-light">File Members</v-toolbar-title>
+     
+            </v-toolbar>
+ </v-layout>
+                          
+                            <v-layout row wrap v-for="(mpid,order) in members" :key="mpid.pid">
+
+   <v-flex xs2 class="subheading">
+                    <a :href="'https://' + instance.baseurl +'/'+mpid.pid" target="_blank">{{'https://' + instance.baseurl +'/'+mpid.pid}}</a>
+             
+                  
+                  </v-flex>
+ 
+ <v-flex xs2>
+        <p-img                         
+        
+         :src="'https://' + instance.baseurl + '/preview/' + mpid.pid + '///120'"
+                          class="elevation-1"
+                        >
+                          <v-layout slot="placeholder" fill-height align-center justify-center ma-0>
+                            <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                          </v-layout>
+                        </p-img>
+ </v-flex>
+    <v-flex xs8> <ph-d-jsonld :jsonld="displayjsonldmembers[order]"> </ph-d-jsonld></v-flex>
+                   
+   </v-layout>
+ 
+                     
                       </v-card-text>
                     </v-card>
                   </v-flex>
                 </v-window-item>
-                <v-window-item>
+               <!-- <v-window-item>
                   <v-flex>
                     <v-card>
                       <v-toolbar flat>
@@ -148,18 +184,13 @@
                         >Load</v-btn>
                       </v-toolbar>
                       <v-card-text>
-                        <!--  <p-i-form
-                          :form="editform"
-                          :targetpid="this.pid"
-                          v-on:object-saved="objectSaved($event)"
-                          v-on:load-form="form = $event"
-                        ></p-i-form>-->
+                      
                       </v-card-text>
                     </v-card>
                   </v-flex>
-                </v-window-item>
+                </v-window-item>-->
 
-                <v-window-item>
+               <!-- <v-window-item>
                   <v-flex>
                     <v-card>
                       <v-toolbar flat>
@@ -183,7 +214,7 @@
                       </v-card-text>
                     </v-card>
                   </v-flex>
-                </v-window-item>
+                </v-window-item>-->
               </v-window>
             </v-flex>
           </v-layout>
@@ -196,6 +227,7 @@
 <script>
 import Vue from "vue";
 import qs from "qs";
+import PIForm from "@/components/input/phaidra_inputs/PIForm";
 import PhSubmit from "@/components/input/PhSubmit";
 import PhDJsonld from "@/components/display/pharma_display/PhDJsonld";
 import PMDelete from "@/components/management/PMDelete";
@@ -207,6 +239,7 @@ import PSearch from "@/components/search/PSearch";
 import { version } from "../package.json";
 import fields from "@/utils/fields";
 import jsonLd from "@/utils/json-ld";
+import PImg from "@/components/utils/PImg";
 import "@/compiled-icons/univie-sprache";
 import "@/compiled-icons/material-social-person";
 import "@/compiled-icons/material-navigation-menu";
@@ -221,7 +254,9 @@ export default {
     PMSort,
     PMRights,
     PMRelationships,
-    PMFiles
+    PMFiles,
+    PIForm,
+    PImg
   },
   computed: {
     loadedcmodel: function() {
@@ -258,14 +293,14 @@ export default {
         { text: "deutsch", value: "deu" }
       ],
       displayjsonld: {},
+      displayjsonldmembers: [],
       editform: {},
       form: {
         sections: []
       },
       members: [],
-
-      pid: "o:582674",
-      //pid: "o:582678",thhis is the assay one
+      fullmembers: [],
+      pid: "o:589108",
       piddoc: {},
       collection: "",
       sampleCollection: "",
@@ -280,11 +315,14 @@ export default {
       },
       version: version,
       contentmodel: "https://pid.phaidra.org/vocabulary/8MY0-BQDQ",
-
       psvis: true
     };
   },
   methods: {
+    getPid: function() {
+      var newpid = this.pid.replace(/\s+/g, "");
+      this.pid = newpid;
+    },
     getResourceTypeFromMimeType: function(mime) {
       switch (mime) {
         case "image/jpeg":
@@ -430,53 +468,14 @@ export default {
 
       return promise;
     },
-    loadMembers: function(pid) {
-      var self = this;
-
+    getMembers: function(pid) {
       this.members = [];
-
-      var params = {
-        q: 'ismemberof:"' + pid + '"',
-        defType: "edismax",
-        wt: "json",
-        qf: "ismemberof^5",
-        fl: "pid,cmodel,dc_title,created",
-        sort: "pos_in_" + pid.replace(":", "_") + " asc"
-      };
-
-      var query = qs.stringify(params, {
-        encodeValuesOnly: true,
-        indices: false
-      });
-      var url = self.instance.solr + "/select?" + query;
-      var promise = fetch(url, {
-        method: "GET",
-        mode: "cors"
-      })
-        .then(function(response) {
-          return response.json();
-        })
-        .then(function(json) {
-          if (json.response.numFound > 0) {
-            self.members = json.response.docs;
-          } else {
-            self.members = [];
-          }
-        })
-        .catch(function(error) {
-          console.log(error); // eslint-disable-line no-console
-        });
-
-      return promise;
-    },
-    loadMetadata: function(pid) {
-      this.loadedMetadata = [];
       var self = this;
       var url =
         self.$store.state.settings.instance.api +
         "/object/" +
         pid +
-        "/metadata?mode=resolved";
+        "/members/order";
       var promise = fetch(url, {
         method: "GET",
         mode: "cors"
@@ -485,9 +484,8 @@ export default {
           return response.json();
         })
         .then(function(json) {
-          if (json.metadata["JSON-LD"]) {
-            //console.log("load metadata returned", json.metadata["JSON-LD"])
-            return json.metadata["JSON-LD"];
+          if (json.metadata["members"]) {
+            return json.metadata["members"];
           }
         })
         .catch(function(error) {
@@ -495,12 +493,102 @@ export default {
         });
       return promise;
     },
-    loadDisplay: function() {
+    loadMembers: async function(pid) {
+      this.members = [];
+      var params = {
+        q: 'ismemberof:"' + pid + '"',
+        defType: "edismax",
+        wt: "json",
+        qf: "ismemberof^5",
+        //fl: 'pid,cmodel,dc_title,created',
+        sort: "pos_in_" + pid.replace(":", "_") + " asc"
+      };
+      try {
+        let response = await this.$http.request({
+          method: "GET",
+          url: this.instance.solr + "/select?",
+          params: params
+        });
+
+        if (response.data.response.numFound > 0) {
+          //this.members = response.data.response.docs
+          return response.data.response.docs;
+        } else {
+          return [];
+        }
+      } catch (error) {
+        console.log(error);
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    loadMetadata: async function(pid) {
+      this.loadedMetadata = [];
+      try {
+        let response = await this.$http.request({
+          method: "GET",
+          url:
+            this.$store.state.settings.instance.api +
+            "/object/" +
+            pid +
+            "/metadata",
+          params: {
+            mode: "resolved"
+          }
+        });
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit("setAlerts", response.data.alerts);
+        }
+        if (response.data.metadata["JSON-LD"]) {
+          return response.data.metadata["JSON-LD"];
+        }
+      } catch (error) {
+        console.log(error);
+      } finally {
+        this.loading = false;
+      }
+    },
+    loadDisplay: async function() {
       this.displayjsonld = {};
-      let self = this;
+      this.displayjsonldmembers = [];
+      var self = this;
 
-      this.loadMetadata(self.pid).then(function(jsonld) {
-        self.displayjsonld = jsonld;
+      try {
+        await self.loadMetadata(self.pid).then(function(jsonld) {
+          self.displayjsonld = jsonld;
+        });
+        //this.getMembers(self.pid).then(function(jsonmembers) {
+        //  self.members = jsonmembers;
+        //});
+        await self.loadMembers(self.pid).then(function(jsonmembers) {
+          self.members = jsonmembers;
+        });
+      } finally {
+        self.loadMembersjson();
+      }
+    },
+    loadMembersjson: function() {
+      var self = this;
+      let array = new Array();
+      var fetches = [];
+      for (var m = 0; m < self.members.length; m++) {
+        fetches.push(
+          self
+            .loadMetadata(self.members[m].pid)
+            .then(function(response) {
+              array.push(response);
+            })
+            .catch(function(error) {
+              console.error(error);
+            })
+        );
+      }
+      Promise.all(fetches).then(function() {
+        //console.log("promise array", array, array.length);
+        //copy to myDatabaseData by value
+        self.displayjsonldmembers = array;
+        //console.log("end of promise", array);
       });
     },
     loadEdit: function() {
@@ -583,47 +671,47 @@ export default {
           },
           {
             title: "Content Classification",
-            type: "phaidra:Subject",
+            type: "pharma_content",
             id: "content",
             isActive: true,
             categories: [
               {
-                id: 1,
+                id: "biologicalMacromolecule",
                 component: "uniprot",
                 description: "Biological macromolecules",
                 question: "Connection to biological macromolecules",
                 fields: []
               },
               {
-                id: 2,
+                id: "life",
                 component: "taxon_cell",
                 description: "Living organisms",
                 question: "Connection to living organisms",
                 fields: []
               },
               {
-                id: 3,
+                id: "assay",
                 component: "bioassay",
                 description: "Bioassay",
                 question: "Bioassay content",
                 fields: []
               },
               {
-                id: 4,
+                id: "disease",
                 component: "disease",
                 description: "Diseases",
                 question: "Connection to diseases",
                 fields: []
               },
               {
-                id: 5,
+                id: "anatomicalCategory",
                 component: "anatomy",
                 description: "Anatomical entity",
                 question: "Relation to anatomical entity",
                 fields: []
               },
               {
-                id: 6,
+                id: "goTerm",
                 component: "GO",
                 description: "GO terms",
                 question: "Matching Gene Ontology terms",
@@ -632,27 +720,34 @@ export default {
                 fields: []
               },
               {
-                id: 7,
+                id: "chebi",
                 component: "chebi",
                 question: "Associated CHEBI-terms",
                 description: "CHEBI-terms",
                 fields: []
               },
               {
-                id: 8,
+                id: "technique",
                 component: "technique",
                 question: "Used techniques",
                 description: "Techniques",
                 fields: []
               },
               {
-                id: 9,
+                id: "discipline",
                 component: "discipline",
                 question: "Involved disciplines",
                 description: "Disciplines",
                 fields: []
               }
             ]
+          },
+          {
+            title: "Submit",
+            type: "digitalobject",
+            id: "submit",
+            isActive: true,
+            fields: []
           }
         ]
       };
@@ -665,7 +760,8 @@ export default {
       this.form.sections[0].fields.push(fields.getField("date"));
       this.form.sections[0].fields.push(fields.getField("contributors"));
       this.form.sections[0].fields.push(fields.getField("projects"));
-      this.form.sections[0].fields.push(fields.getField("license"));
+      //this is moved to file section now
+      //this.form.sections[0].fields.push(fields.getField("license"));
 
       this.form.sections[1].fields.push(fields.getField("file"));
 
@@ -720,23 +816,23 @@ export default {
 
       var uniprot_assayTarget = fields.getField("1-Uniprot");
       uniprot_assayTarget.label = "Assay Target Uniprot record";
-      uniprot_assayTarget.subjectType = "AssayTarget_uniprot";
-      uniprot_assayTarget.type = "skos:Concept";
+
+      uniprot_assayTarget.type = "pharmaWien:uniprot_protein_assayTarget";
       uniprot_assayTarget.category = ["assayTarget"];
       var isoform_assayTarget = fields.getField("1-Isoform");
       isoform_assayTarget.label = "Assay Target Isoform";
-      isoform_assayTarget.subjectType = "AssayTarget_isoform";
-      isoform_assayTarget.type = "AssayTarget_isoform";
+
+      isoform_assayTarget.type = "pharmaWien:assayTarget_isoform_protein";
       isoform_assayTarget.category = ["assayTarget"];
       var seqAlt_assayTarget = fields.getField("1-Protein-sequence-alteration");
       seqAlt_assayTarget.label = "Assay Target Protein sequence alteration";
-      seqAlt_assayTarget.subjectType = "AssayTarget_seqAlt";
-      seqAlt_assayTarget.type = "AssayTarget_seqAlt";
+
+      seqAlt_assayTarget.type = "pharmaWien:assayTarget_seqAlt_protein";
       seqAlt_assayTarget.category = ["assayTarget"];
       var protMod_assayTarget = fields.getField("1-Protein-modification");
       protMod_assayTarget.label = "Assay Target Protein Modification";
-      protMod_assayTarget.subjectType = "AssayTargetprotMod";
-      protMod_assayTarget.type = "AssayTargetprotMod";
+
+      protMod_assayTarget.type = "pharmaWien:assayTarget_protMod_protein";
       protMod_assayTarget.category = ["assayTarget"];
       this.form.sections[2].categories[2].fields.push(uniprot_assayTarget);
       this.form.sections[2].categories[2].fields.push(isoform_assayTarget);
@@ -745,49 +841,49 @@ export default {
 
       var gene_assayTarget = fields.getField("1-Entrez-gene-ID");
       gene_assayTarget.label = "Assay Target Entrez Gene ID";
-      gene_assayTarget.subjectType = "AssayTarget_geneId";
-      gene_assayTarget.type = "AssayTarget_geneId";
+
+      gene_assayTarget.type = "pharmaWien:assayTarget_geneId";
       gene_assayTarget.category = ["assayTarget"];
       var geneMod_assayTarget = fields.getField("1-Gene-modification");
       geneMod_assayTarget.label = "Assay Target Gene Modification";
-      geneMod_assayTarget.subjectType = "AssayTarget_geneMod";
-      geneMod_assayTarget.type = "AssayTarget_geneMod";
+
+      geneMod_assayTarget.type = "pharmaWien:assayTarget_geneMod";
       geneMod_assayTarget.category = ["assayTarget"];
       this.form.sections[2].categories[2].fields.push(gene_assayTarget);
       this.form.sections[2].categories[2].fields.push(geneMod_assayTarget);
 
       var nacid_assayTarget = fields.getField("1-Nucleic-acid-type");
       nacid_assayTarget.label = "Assay Target Nucleic Acid Type";
-      nacid_assayTarget.subjectType = "AssayTarget_nucleic_acid";
-      nacid_assayTarget.type = "skos:Concept";
+
+      nacid_assayTarget.type = "pharmaWien:assayTarget_type_nucleicAcid";
       nacid_assayTarget.category = ["assayTarget"];
       nacid_assayTarget.description = "Nucleic Acid";
       var refSeq_assayTarget = fields.getField("1-RefSeq-accession");
       refSeq_assayTarget.label = "Assay Target RefSeq accession:";
-      refSeq_assayTarget.subjectType = "AssayTarget_refSeq";
-      refSeq_assayTarget.type = "AssayTarget_refSeq";
+
+      refSeq_assayTarget.type = "pharmaWien:assayTarget_refSeq_nucleicAcid";
       refSeq_assayTarget.category = ["assayTarget"];
       refSeq_assayTarget.description = "Nucleic Acid";
       this.form.sections[2].categories[2].fields.push(nacid_assayTarget);
       this.form.sections[2].categories[2].fields.push(refSeq_assayTarget);
       var PFAM_assayTarget = fields.getField("1-PFAM-accession");
       PFAM_assayTarget.label = "Assay Target PFAM accession number";
-      PFAM_assayTarget.subjectType = "AssayTarget_PFAM";
-      PFAM_assayTarget.type = "AssayTarget_PFAM";
+
+      PFAM_assayTarget.type = "pharmaWien:assayTarget_PFAM";
       PFAM_assayTarget.category = ["assayTarget"];
       this.form.sections[2].categories[2].fields.push(PFAM_assayTarget);
 
       var uniprotsub_assayTarget = fields.getField("1-Uniprot");
       uniprotsub_assayTarget.label =
         "Assay Target Protein Subunit Uniprot record";
-      uniprotsub_assayTarget.subjectType = "AssayTarget_uniprot_subunit";
-      uniprotsub_assayTarget.type = "skos:Concept";
+
+      uniprotsub_assayTarget.type = "pharmaWien:assayTarget_uniprot_protSub";
       uniprotsub_assayTarget.category = ["assayTarget"];
       uniprotsub_assayTarget.description = "Protein Subunit";
       var isoformsub_assayTarget = fields.getField("1-Isoform");
       isoformsub_assayTarget.label = "Assay Target Protein Subunit Isoform";
-      isoformsub_assayTarget.subjectType = "AssayTarget_isoform_subunit";
-      isoformsub_assayTarget.type = "AssayTarget_isoform_subunit";
+
+      isoformsub_assayTarget.type = "pharmaWien:assayTarget_isoform_protSub";
       isoformsub_assayTarget.category = ["assayTarget"];
       isoformsub_assayTarget.description = "Protein Subunit";
       var seqAltsub_assayTarget = fields.getField(
@@ -795,13 +891,13 @@ export default {
       );
       seqAltsub_assayTarget.label =
         "Assay Target Protein Subunit sequence alteration";
-      seqAltsub_assayTarget.subjectType = "AssayTarget_seqAlt_subunit";
+      seqAltsub_assayTarget.type = "pharmaWien:assayTarget_seqAlt_protSub";
       seqAltsub_assayTarget.category = ["assayTarget"];
       seqAltsub_assayTarget.description = "Protein Subunit";
       var protModsub_assayTarget = fields.getField("1-Protein-modification");
       protModsub_assayTarget.label =
         "Assay Target Protein Subunit modification";
-      protModsub_assayTarget.subjectType = "AssayTargetprotMod_subunit";
+      protModsub_assayTarget.type = "pharmaWien:assayTarget_protMod_protSub";
       protModsub_assayTarget.category = ["assayTarget"];
       protModsub_assayTarget.description = "Protein Subunit";
       this.form.sections[2].categories[2].fields.push(uniprotsub_assayTarget);
@@ -813,7 +909,8 @@ export default {
       );
       protcomplex_assayTarget.label =
         "Assay Target Protein Complex-Portal Accession";
-      protcomplex_assayTarget.subjectType = "AssayTarget_proteincompex";
+      protcomplex_assayTarget.type =
+        "pharmaWien:assayTarget_portalAcc_protComplex";
       protcomplex_assayTarget.category = ["assayTarget"];
       this.form.sections[2].categories[2].fields.push(protcomplex_assayTarget);
       this.form.sections[2].categories[2].fields.push(
@@ -821,8 +918,8 @@ export default {
       );
       var lipid_assayTarget = fields.getField("1-Lipid");
       lipid_assayTarget.label = "Assay Target Lipid";
-      lipid_assayTarget.type = "skos:Concept";
-      lipid_assayTarget.subjectType = "Lipid_assayTarget";
+      lipid_assayTarget.type = "pharmaWien:assayTarget_lipid";
+
       lipid_assayTarget.category = ["assayTarget"];
 
       this.form.sections[2].categories[2].fields.push(lipid_assayTarget);
@@ -830,22 +927,15 @@ export default {
       this.form.sections[2].categories[2].fields.push(
         fields.getField("0-Small-molecule")
       );
-      var organism_assayTarget = fields.getField("0-Organism");
-      organism_assayTarget.type = "skos:Concept";
-      organism_assayTarget.label = "Assay Target Organism";
-      organism_assayTarget.subjectType = "organism_assayTarget";
-      organism_assayTarget.visible = false;
-      organism_assayTarget.description = "Organism";
-      organism_assayTarget.category = ["assayTarget"];
-      organism_assayTarget.subcategory = ["organismAssayTarget"];
-      organism_assayTarget.stateVoc = "organism_assay_target";
-
-      this.form.sections[2].categories[2].fields.push(organism_assayTarget);
+      this.form.sections[2].categories[2].fields.push(
+        fields.getField("0-Organism-assayTarget")
+      );
 
       var cell_organism_assayTarget = fields.getField("0-Cellular-organism");
       //cell_organism_assayTarget.description = ["Cellular organism", "Organism"];
       cell_organism_assayTarget.label = "Assay Target Cellular Organism";
-      cell_organism_assayTarget.subjectType = "cellular_organism_assayTarget";
+      cell_organism_assayTarget.type =
+        "pharmaWien:assayTarget_cellular_organism";
       cell_organism_assayTarget.category = ["organismAssayTarget"];
       // cell_organism_assayTarget.topcategory = "assayTarget";
       cell_organism_assayTarget.visible = false;
@@ -855,7 +945,8 @@ export default {
       var viruses_organism_assayTarget = fields.getField("0-Viruses");
       //viruses_organism_assayTarget.description = ["Viruses", "Organism"];
       viruses_organism_assayTarget.label = "Assay Target Viruses";
-      viruses_organism_assayTarget.subjectType = "viruses_assayTarget";
+      viruses_organism_assayTarget.type =
+        "pharmaWien:assayTarget_viruses_organism";
       // cell_organism_assayTarget.topcategory = "assayTarget";
       viruses_organism_assayTarget.category = ["organismAssayTarget"];
 
@@ -866,7 +957,8 @@ export default {
       var viroids_organism_assayTarget = fields.getField("0-Viroids");
       //viroids_organism_assayTarget.description = ["Viroids", "Organism"];
       viroids_organism_assayTarget.label = "Assay Target Viroids";
-      viroids_organism_assayTarget.subjectType = "viroids_assayTarget";
+      viroids_organism_assayTarget.subjectType =
+        "pharmaWien:assayTarget_viroids_organism";
       viroids_organism_assayTarget.category = ["organismAssayTarget"];
       // cell_organism_assayTarget.topcategory = "assayTarget";
       viroids_organism_assayTarget.visible = false;
@@ -875,8 +967,8 @@ export default {
       );
       var cell_line_assayTarget = fields.getField("0-cell-line");
       cell_line_assayTarget.label = "Assay Target Cell line (cellosaurus)";
-      cell_line_assayTarget.type = "skos:Concept";
-      cell_line_assayTarget.subjectType = "cell_line_assayTarget";
+      cell_line_assayTarget.type = "pharmaWien:assayTarget_cellosaurus";
+
       cell_line_assayTarget.visible = false;
       cell_line_assayTarget.category = ["assayTarget"];
       this.form.sections[2].categories[2].fields.push(cell_line_assayTarget);
@@ -1020,12 +1112,12 @@ export default {
       this.form.sections[2].categories[6].fields.push(
         fields.getField("6-Chemical-entities")
       );
-      this.form.sections[2].categories[6].fields.push(
-        fields.getField("6-Atom")
-      );
-      this.form.sections[2].categories[6].fields.push(
-        fields.getField("6-chemical-substance")
-      );
+      // this.form.sections[2].categories[6].fields.push(
+      //   fields.getField("6-Atom")
+      // );
+      // this.form.sections[2].categories[6].fields.push(
+      //   fields.getField("6-chemical-substance")
+      // );
       this.form.sections[2].categories[6].fields.push(
         fields.getField("6-Role")
       );
diff --git a/src/components/browse/PCollectionGallery.vue b/src/components/browse/PCollectionGallery.vue
new file mode 100644
index 0000000000000000000000000000000000000000..4e8a9925a2d5883ba429ad3f839d271880ba5910
--- /dev/null
+++ b/src/components/browse/PCollectionGallery.vue
@@ -0,0 +1,219 @@
+<template>
+  <v-container>
+    <v-row>
+      <v-toolbar>
+        <v-toolbar-title>Toolbar</v-toolbar-title>
+        <v-spacer></v-spacer>
+        <v-btn icon @click="mode = 'single'">
+          <v-icon>mdi-image-outline</v-icon>
+        </v-btn>
+        <v-btn icon @click="mode = 'gallery'">
+          <v-icon>mdi-grid</v-icon>
+        </v-btn>
+      </v-toolbar>
+    </v-row>
+    <v-row>
+      <v-col md="auto">
+        <v-treeview
+          :items="collections"
+          :load-children="getChildren"
+          :active.sync="active"
+          :open.sync="open"
+          activatable
+          transition
+          color="primary"
+        ></v-treeview>
+      </v-col>
+      <v-divider vertical></v-divider>
+      <v-col v-if="mode === 'single'">
+        <v-carousel hide-delimiters height="100%">
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039867/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039866/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039865/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039864/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039863/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039862/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039861/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039860/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+          <v-carousel-item :src="'https://phaidra.univie.ac.at/preview/o:1039859/ImageManipulator/boxImage/800/jpg'"></v-carousel-item>
+        </v-carousel>
+      </v-col>
+      <v-col v-if="mode === 'gallery'">
+        <v-container>
+          <v-row>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039867/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039866/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039865/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039864/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039863/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039862/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039861/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039860/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+            <v-col class="d-flex child-flex" cols="4">
+              <v-card flat tile class="d-flex">
+                <v-img class="grey lighten-2" aspect-ratio="1" :src="'https://phaidra.univie.ac.at/preview/o:1039859/ImageManipulator/boxImage/800/jpg'">
+                  <template v-slot:placeholder>
+                    <v-row class="fill-height ma-0" align="center" justify="center">
+                      <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
+                    </v-row>
+                  </template>
+                </v-img>
+              </v-card>
+            </v-col>
+          </v-row>
+        </v-container>
+      </v-col>
+    </v-row>
+  </v-container>
+</template>
+
+<script>
+import qs from 'qs'
+
+export default {
+  name: 'p-collection-gallery',
+  props: {
+    collection: {
+      type: String,
+      required: true
+    }
+  },
+  data () {
+    return {
+      active: [],
+      open: [this.collection],
+      collections: [
+        {
+          id: this.collection,
+          name: 'Root',
+          children: []
+        }
+      ],
+      mode: 'gallery',
+      selectedImage: {
+        src: ''
+      }
+    }
+  },
+  methods: {
+    getChildren: async function (item) {
+      try {
+        let params = {
+          q: '*:*',
+          defType: 'edismax',
+          wt: 'json',
+          fq: 'ispartof:"' + item.id + '"',
+          start: 0,
+          rows: 5000
+        }
+        let response = await this.$http.request({
+          method: 'POST',
+          url: this.$store.state.instanceconfig.solr + '/select',
+          data: qs.stringify(params, { arrayFormat: 'repeat' }),
+          headers: {
+            'content-type': 'application/x-www-form-urlencoded'
+          }
+        })
+        let docs = response.data.response.docs
+        let total = response.data.response.numFound
+        if (total < 1) {
+          console.log(item.id + ' has ' + total + ' members')
+          return
+        }
+        for (let member of docs) {
+          let node = {
+            id: member.pid,
+            name: member.dc_title,
+            children: []
+          }
+          item.children.push(node)
+        }
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      }
+    }
+  }
+
+}
+</script>
diff --git a/src/components/display/pharma_display/PDSkosPreflabel.vue b/src/components/display/pharma_display/PDSkosPreflabel.vue
index 0a7c1026819287f05b8693581f364b41efaf9542..91a16e49833de10e6c0743cf9429b905669e000e 100644
--- a/src/components/display/pharma_display/PDSkosPreflabel.vue
+++ b/src/components/display/pharma_display/PDSkosPreflabel.vue
@@ -1,5 +1,6 @@
 <template>
   <v-flex>
+   
     <v-layout column>
       <v-flex>
         <template v-for="(l, i) in o['skos:prefLabel']">
@@ -8,8 +9,9 @@
               {{ $t(o['@type']) }}
               <template v-if="l['@language']">({{ l['@language'] }})</template>
             </v-flex>
+           
             <v-flex md4 xs12 v-else class="pdlabel primary--text" :key="'l'+i">
-              {{ $t(p) }}
+           {{ $t(p) }}
               <template v-if="l['@language']">({{ l['@language'] }})</template>
             </v-flex>
             <v-flex md8 xs12 v-if="o['skos:exactMatch']" :key="'t-id'+i">
@@ -19,7 +21,7 @@
                 target="_blank"
               >{{ l['@value'] }}</a>
             </v-flex>
-            <v-flex class="valuefield" md8 xs12 v-else :key="'t'+i">{{ l['@value'] }}</v-flex>
+            <v-flex class="valuefield" md8 xs12 v-else :key="'t'+i"> {{ l['@value'] }}</v-flex>
           </v-layout>
         </template>
       </v-flex>
diff --git a/src/components/display/pharma_display/PhDJsonld.vue b/src/components/display/pharma_display/PhDJsonld.vue
index 218f373bbb640e4bbea8bac19e5caab5da23015d..f496cf95783f8a374f44770d91ef2746fa83aaac 100644
--- a/src/components/display/pharma_display/PhDJsonld.vue
+++ b/src/components/display/pharma_display/PhDJsonld.vue
@@ -1,15 +1,13 @@
 <template>
-  <ph-d-jsonld-layout v-if="jsonld">
-    <template v-if="pid" slot="pid">
-      <v-flex>
-        <v-layout row wrap>
-          <v-flex md4 xs12 class="pdlabel primary--text">{{ $t('Persistent identifier') }}</v-flex>
-          <v-flex md8 xs12>https://{{ instance.baseurl }}/{{ pid }}</v-flex>
-        </v-layout>
-      </v-flex>
-    </template>
+
+<ph-d-jsonld-layout v-if="jsonld">
+
+   
+ <template>
 
     <template v-for="(o, p) in jsonld">
+      
+
       <template v-if="p==='dcterms:type'" slot="dcterms:type">
         <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'type'+j"></p-d-skos-preflabel>
       </template>
@@ -17,7 +15,9 @@
       <template v-else-if="p==='edm:hasType'" slot="edm:hasType">
         <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'objtyp'+j"></p-d-skos-preflabel>
       </template>
-
+<template v-else-if="p==='dcterms:accessRights'" slot="dcterms:accessRights">
+          <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dtar'+j" v-bind.sync="displayProperties"></p-d-skos-preflabel>
+        </template>
       <template v-else-if="p==='schema:genre'" slot="schema:genre">
         <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'genre'+j"></p-d-skos-preflabel>
       </template>
@@ -190,6 +190,7 @@
       </template>
 
       <template v-else-if="p==='ebucore:filename'" slot="ebucore:filename">
+        
         <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'filename'+j"></p-d-value>
       </template>
 
@@ -309,69 +310,93 @@
             <p-d-skos-preflabel :p="p" :o="subject" :key="componentid+'subject'+j"></p-d-skos-preflabel>
           </template>
         </template>
+        <template v-for="(categ,index) in pharmaStructure">
+          <v-card v-if="categ.fields.length>0" :key="index+categ.category">
+          
+            <v-toolbar dense flat>
+              <v-layout>
+                <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title>
+              </v-layout>
+            </v-toolbar>
+
+            <template v-if="categ.fields.length>0">
+             
+              <v-card v-for="(l,index) in categ.fields" :key="l['@type']+'field'+index">
+              <v-layout v-if="l">
+             
+                 <!-- <v-flex xs1 class="subheading">
+                    <a :href="l.id" target="_blank">{{l.label}}</a>
+                  </v-flex>-->
+                  <v-flex xs11>
+                    <!--<v-card v-for="(inputf,index) in l" :key="index+'subjectField'">-->
+                  
+                      <!-- <v-flex xs2 v-if="inputf.selection">{{getLabel(inputf.data['@type'])}}</v-flex>-->
+                      <p-d-skos-preflabel
+                        v-if="getSkosexactMatch(l)==undefined"
+                      
+                        :o="l"
+                        :key="l+index+'pharmafreesubject'"
+                      ></p-d-skos-preflabel>
 
-        <template v-for="sec in pharmaSubjects">
-          <v-card v-if="getCatElem(sec.type)&&getCatElem(sec.type).length>0" :key="sec.type">
+                      <ph-d-metadata
+                        v-if="getSkosexactMatch(l)"
+                        :o="l"
+                        :p="p"
+                        :key="l+index+'pharmasubject'"
+                      ></ph-d-metadata>
+                     <v-divider></v-divider>
+                  </v-flex>
+                
+                </v-layout>
+              </v-card>
+            </template>
+           
+          </v-card>
+          <v-card v-if="categ.subcategory" :key="index+categ.label">
+        
             <v-toolbar dense flat>
               <v-layout>
-                <v-toolbar-title class="font-weight-light">{{sec.title}}</v-toolbar-title>
+                <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title>
               </v-layout>
             </v-toolbar>
-            <template v-if="sec.selections">
-              <v-card v-for="s in sec.selections" :key="s.label+'t'">
-                <v-layout v-if="getSelectionElem(sec.type,s.label).length>0">
+
+            <template v-if="categ.subcategory.length>0">
+
+              <v-card v-for="l in categ.subcategory" :key="l.category+'field'">
+                <v-layout v-if="l">
+            
+      
                   <v-flex xs1 class="subheading">
-                    <a :href="s.id" target="_blank">{{s.label}}</a>
+                    <a :href="l.id" target="_blank">{{l.category}}</a>
                   </v-flex>
                   <v-flex xs11>
-                    <v-card
-                      v-for="(inputf,index) in getSelectionElem(sec.type,s.label)"
-                      :key="index+'subj'"
-                    >
-                      <v-flex xs2 v-if="inputf.selection">{{getLabel(inputf.data['@type'])}}</v-flex>
+                    <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'">
+                      <!-- <v-flex xs2 v-if="inputf.selection">{{getLabel(inputf.data['@type'])}}</v-flex>-->
                       <p-d-skos-preflabel
-                        v-if="getSkosexactMatch(inputf.data)==undefined"
-                        :p="getDescription(inputf.data['@type']) + ' '+getLabel(inputf.data['@type'])"
-                        :o="inputf.data"
+                        v-if="getSkosexactMatch(inputf)==undefined"
+                        :p="getLabel(inputf['@type'])"
+                        :o="inputf"
                         :key="inputf+index+'pharmafreesubject'"
                       ></p-d-skos-preflabel>
 
                       <ph-d-metadata
-                        v-if="getSkosexactMatch(inputf.data)"
-                        :o="inputf.data"
+                        v-if="getSkosexactMatch(inputf)"
+                        :o="inputf"
                         :p="p"
                         :key="inputf+index+'pharmasubject'"
                       ></ph-d-metadata>
+                      <v-divider></v-divider>
                     </v-card>
+                    
                   </v-flex>
-                  <v-divider></v-divider>
+               
                 </v-layout>
               </v-card>
             </template>
-            <template v-else>
-              <v-card v-for="(inputf,index) in getCatElem(sec.type)" :key="index+'subj'">
-                <v-flex xs2>
-                  <a :href="sec.id" target="_blank">{{getLabel(inputf.data['@type'])}}</a>
-                </v-flex>
-
-                <p-d-skos-preflabel
-                  v-if="getSkosexactMatch(inputf.data)==undefined"
-                  :p="getLabel(inputf.data['@type'])"
-                  :o="inputf.data"
-                  :key="inputf+index+'pharmafreesubject'"
-                ></p-d-skos-preflabel>
-                <ph-d-metadata
-                  v-if="getSkosexactMatch(inputf.data)"
-                  :o="inputf.data"
-                  :p="p"
-                  :key="inputf+index+'pharmasubject'"
-                ></ph-d-metadata>
-
-                <v-divider></v-divider>
-              </v-card>
-            </template>
+           
           </v-card>
         </template>
+          
       </template>
 
       <template v-else-if="p==='@type'"></template>
@@ -386,7 +411,11 @@
         </v-container>
       </template>
     </template>
+    </template>
+    
+ 
   </ph-d-jsonld-layout>
+
 </template>
 
 <script>
@@ -415,6 +444,7 @@ import { vocabulary } from "../../../mixins/vocabulary";
 import { parseoutput } from "../../../mixins/parseoutput";
 import { matchsubject } from "../../../mixins/matchsubject";
 import fields from "../../../utils/fields";
+import PImg from "../../utils/PImg";
 
 export default {
   name: "ph-d-jsonld",
@@ -424,22 +454,148 @@ export default {
     instance: function() {
       return this.$store.state.settings.instance;
     },
+    s: function() {
+      return this.form.sections;
+    },
     componentid: function() {
       return Math.floor(Math.random() * 10000000);
     },
+    pharmaStructure: function() {
+      var subjectjson = this.jsonld["dcterms:subject"];
+      //filter subjects for only the ones with subjects[i]["@type"]=!= "skos:Concept"
+      //that would be the pharma-related subjects
+      var pharmajson = subjectjson.filter(
+        subjectjson => subjectjson["@type"] != "skos:Concept"
+      );
+
+      var formCategories = this.s[2].categories;
+      var jsonStructured = [];
+      for (let i = 0; i < formCategories.length; i++) {
+        //only look at the ones which have not a skos:Concept type
+        var formFields = formCategories[i].fields;
+
+        jsonStructured[i] = {
+          category: formCategories[i].id,
+          label: formCategories[i].description,
+          fields: []
+        };
+
+        var formFieldsFiltered = formFields.filter(
+          formFields => formFields.type != "skos:Concept"
+        );
+
+        for (var j = 0; j < formFieldsFiltered.length; j++) {
+          //filter all the elem in subjects which have this type
+          var jsonTypeArray = pharmajson.filter(function(fs) {
+            return fs["@type"] == formFieldsFiltered[j].type;
+          });
+
+          if (jsonTypeArray.length > 0) {
+            //for (var k = 0; k < jsonTypeArray.length; k++) {
+            //  console.log("jsonTypeArray", jsonTypeArray[k]);
+            //}
+            //find first whether there is a subcategory
+            if (formFieldsFiltered[j].subcategory) {
+              //the category is formFieldsFiltered[j].category
+              // if it exists, push to it, otherwise create it
+              var n_categ = formFieldsFiltered[j].category[0];
+              var n_subcat = formFieldsFiltered[j].subcategory[0];
+              //check if it exists already
+              var result = jsonStructured.findIndex(
+                obj => obj.category === n_categ
+              );
+
+              if (result >= 0) {
+                if (jsonStructured[result].subcategory) {
+                  var r = jsonStructured[result].subcategory.findIndex(
+                    obj => obj.category === n_subcat
+                  );
+
+                  if (r >= 0) {
+                    for (var n = 0; n < jsonTypeArray.length; n++) {
+                      jsonStructured[result].subcategory[r].fields.push(
+                        jsonTypeArray[n]
+                      );
+                    }
+                  } else {
+                    jsonStructured[result].subcategory.push({
+                      category: n_subcat,
+                      id: formFieldsFiltered[j].infoRef,
+                      fields: jsonTypeArray
+                    });
+                  }
+                } else {
+                  jsonStructured[result].subcategory = [
+                    {
+                      category: formFieldsFiltered[j].subcategory[0],
+                      id: formFieldsFiltered[j].infoRef,
+                      fields: jsonTypeArray
+                    }
+                  ];
+                }
+              }
+            } else {
+              //the category is formFieldsFiltered[j].category
+              // if it exists, push to it, otherwise create it
+              var n_categ = formFieldsFiltered[j].category[0];
+
+              //check if it exists already
+              var result = jsonStructured.findIndex(
+                obj => obj.category === n_categ
+              );
+
+              if (result >= 0) {
+                /* if (jsonStructured[result].subcategory) {
+                  var r = jsonStructured[result].subcategory.findIndex(
+                    obj => obj.category === n_subcat
+                  );
+                  console.log(
+                    "n_sub r",
+                    r,
+                    "formFieldsFiltered[j].infoRef",
+                    formFieldsFiltered[j].infoRef
+                  );
+                  if (r >= 0) {
+                    jsonStructured[result].subcategory[r].fields.push(
+                      jsonTypeArray[0]
+                    );
+                  } else {
+                    jsonStructured[result].subcategory.push({
+                      category: n_subcat,
+                      id: formFieldsFiltered[j].infoRef,
+                      fields: jsonTypeArray
+                    });
+                  }
+                } else {*/
+                jsonStructured[result].fields = jsonTypeArray;
+                //  category: n_categ,
+                //   id: formFieldsFiltered[j].infoRef,
+                //  fields: jsonTypeArray
+                //};
+              }
+            }
+          }
+        }
+      }
+
+      return jsonStructured;
+    },
 
     pharmaData: function() {
       var s = this.jsonld["dcterms:subject"];
       //filter subjects for only the ones with subjects[i]["@type"]=!= "skos:Concept"
+      //that would be the pharma-related subjects
       var subjects = s.filter(s => s["@type"] != "skos:Concept");
 
       var n_subjects = [];
 
       // take all the jsonld["dcterms:subject"] but not the ones which have no skos:prefLabel"
       for (let i = 0; i < subjects.length; i++) {
+        console.log("subject", subjects[i]);
         var subcat = subjects[i]["@type"]; // thuis should be unique to each  entry field, comes from "subjectType" in jsonld
 
         var categ = this.getCategory(subcat);
+
         n_subjects[i] = {};
         if (categ) {
           n_subjects[i].category = categ;
@@ -452,7 +608,8 @@ export default {
 
         n_subjects[i].data = subjects[i];
       }
-      //console.log("pharmaData", n_subjects);
+      console.log("pharmaData", n_subjects);
+      console.log("pharmaSubjects", this.pharmaSubjects);
       return n_subjects;
     }
   },
@@ -465,7 +622,12 @@ export default {
       type: Object,
       default: null
     },
-    pid: String
+    pid: String,
+
+    form: {
+      type: Object,
+      default: null
+    }
   },
   components: {
     PDTitle,
@@ -488,65 +650,22 @@ export default {
     PDAdaptation,
     PDCitation,
     PIUnknownReadonly,
-    PhDMetadata
+    PhDMetadata,
+    PImg
   },
   data() {
-    return {
-      pharmaSubjects: [
-        {
-          type: "biologicalMacromolecule",
-          voc: "biological_macromolecule",
-          selections: this.getSelectionItems("biological_macromolecule"),
-          title: "Connection to biological macromolecules"
-        },
-        {
-          type: "life",
-          voc: "life",
-          selections: this.getSelectionItems("life"),
-          title: "Connection to living organism"
-        },
-        {
-          type: "assay",
-          selections: fields.getFieldsLabelsbyCateg("assay"),
-          title: "Bioassay Content"
-        },
-        {
-          type: "disease",
-          title: "Connection to diseases",
-          id: this.getinfoRef("disease")
-        },
-        {
-          type: "AnatomEntity",
-          voc: "anatomical_category",
-          selections: this.getSelectionItems("anatomical_category"),
-          title: "Relation to anatomical entity"
-        },
-        {
-          type: "Matching Gene Ontology Terms",
-          title: "Matching Gene Ontology Terms"
-        },
-        { type: "", title: "Associated CHEBI-terms", id: this.getinfoRef("") },
-        {
-          type: "technique",
-          title: "Used techniques",
-          id: this.getinfoRef("technique")
-        },
-        {
-          type: "discipline",
-          title: "Involved discipline",
-          id: this.getinfoRef("discipline")
-        }
-      ]
-    };
+    return {};
   },
   methods: {
     alert: function(e) {
       console.log("alert", e);
     },
+
     getCatElem: function(cat) {
       var elem = this.pharmaData.filter(
         pharmaData => pharmaData.category === cat
       );
+
       return elem;
     },
     getSelectionElem: function(categ, selection) {
diff --git a/src/components/display/pharma_display/PhDJsonldLayout.vue b/src/components/display/pharma_display/PhDJsonldLayout.vue
index aa3f9b3a0eb82c7dfb1426a4c8b5005e13486429..b9f5858cba0eed6c970ca5e4ecde62cead19560c 100644
--- a/src/components/display/pharma_display/PhDJsonldLayout.vue
+++ b/src/components/display/pharma_display/PhDJsonldLayout.vue
@@ -1,6 +1,8 @@
 <template>
   <v-container>
     <v-layout column>
+
+    
       <slot name="dce:title"></slot>
       <slot name="role"></slot>
       <slot name="bf:note"></slot>
@@ -76,6 +78,7 @@
       <slot name="dcterms:subject"></slot>
 
       <slot name="unknown-predicate"></slot>
+
     </v-layout>
   </v-container>
 </template>
diff --git a/src/components/display/pharma_display/PhDMetadata.vue b/src/components/display/pharma_display/PhDMetadata.vue
index 146c0150db855ccf64ccabd270d00732f8e7cc57..a7bac9ee6ac8196cad4e102d24178e6c595cc286 100644
--- a/src/components/display/pharma_display/PhDMetadata.vue
+++ b/src/components/display/pharma_display/PhDMetadata.vue
@@ -217,6 +217,11 @@ export default {
         })
         .then(function(body) {
           self.data = body;
+
+          //if body is empty, then just use whatever was there already in the data getData
+          if (body.result == "empty") {
+            self.data = self.getData;
+          }
         })
 
         .catch(function(error) {
diff --git a/src/components/input/PhSubmit.vue b/src/components/input/PhSubmit.vue
index 12f52c56c15a523893b4d15b05d7ec8012e99af6..ca3a8406fb4607ee18739eb7500280c1d82c99b7 100644
--- a/src/components/input/PhSubmit.vue
+++ b/src/components/input/PhSubmit.vue
@@ -1,5 +1,6 @@
 <template>
-  <v-container grid-list-lg fluid class="pa-0 ma-0" v-if="form && form.sections">
+  <!--<v-container grid-list-lg fluid class="pa-0 ma-0" v-if="form && form.sections">-->
+  <v-container>
     <v-tabs v-model="activetab">
       <v-tab ripple>
         Metadata editor
@@ -8,349 +9,22 @@
           <span class="text-lowercase">{{ targetpid }}</span>
         </template>
       </v-tab>
-      <v-tab ripple @click="updatePrettyPrint()">Metadata preview</v-tab>
-      <v-tab v-if="templating" ripple @click="loadTemplates()">Templates</v-tab>
+   <!--   <v-tab ripple @click="updatePrettyPrint()">Metadata preview</v-tab>
+      <v-tab v-if="templating" ripple @click="loadTemplates()">Templates</v-tab>-->
     </v-tabs>
 
     <v-tabs-items v-model="activetab">
       <v-tab-item v-if="form">
-        <!-- Content of "metadata editor" tab -->
-
-        <v-stepper v-model="stepper" non-linear>
-          <v-stepper-header>
-            <template v-for="n in steps">
-              <v-stepper-step
-                :key="`${n}-step`"
-                :edit-icon="'check'"
-                :complete-icon="'edit'"
-                :step="n"
-                :complete="stepper>n"
-                editable
-              >{{s[n-1].title}}</v-stepper-step>
-            </template>
-          </v-stepper-header>
-          <v-stepper-items>
-            <v-stepper-content v-for="n in steps" :key="`${n}-content`" :step="n">
-              <v-flex v-if="s[n-1].id== 'general'">
-                <v-layout align-center justify-center class="ma-0 pa-0">
-                  <v-flex>
-                    <div class="text-xs-right">
-                      <v-btn
-                        :disabled="warning(s[n-1])"
-                        v-if="stepper!==sectionNumbers"
-                        color="primary"
-                        @click="stepper = n+1"
-                      >Continue</v-btn>
-                    </div>
-                  </v-flex>
-                </v-layout>
-                <v-layout v-for="(f) in s[n-1].fields" :key="f.id" row wrap fill-height>
-                  <v-flex xs12 v-if="f.component === 'text-field'">
-                    <v-card-title v-if="f.header !== ''" class="title grey lighten-2 white--text">
-                      <span>{{f.header}}</span>
-                    </v-card-title>
-                    <ph-text-field
-                      v-bind.sync="f"
-                      v-on:input="f.value=$event"
-                      v-on:input-language="setSelected(f, 'language', $event)"
-                      v-on:textfield-validation="f.warning=$event"
-                      v-on:add="addField(s[n-1].fields, f)"
-                      v-on:remove="removeField(s[n-1].fields, f)"
-                    ></ph-text-field>
-                  </v-flex>
-                  <v-flex xs12 v-else-if="f.component === 'pharma-title'">
-                    <ph-title
-                      v-bind.sync="f"
-                      v-on:input-title="f.title=$event"
-                      v-on:input-language="setSelected(f, 'language', $event)"
-                      v-on:title-validation="f.warning=$event"
-                    ></ph-title>
-                  </v-flex>
-                  <v-flex xs12 v-else-if="f.component === 'date'">
-                    <ph-date
-                      v-bind.sync="f"
-                      v-on:input-date-type="setSelected(f, 'type', $event)"
-                      v-on:input-date="f.value=$event"
-                      v-on:add="addField(s[n-1].fields, f)"
-                      v-on:remove="removeField(s[n-1].fields, f)"
-                      v-on:date-validation="f.warning=$event"
-                    ></ph-date>
-                  </v-flex>
-
-                  <v-flex xs12 v-else-if="f.component === 'entity'">
-                    <ph-entity
-                      v-bind.sync="f"
-                      v-on:input-firstname="f.firstname=$event"
-                      v-on:input-lastname="f.lastname=$event"
-                      v-on:input-organisation="f.institution=$event"
-                      v-on:input-role="f.role=$event"
-                      v-on:input-orcid="f.orcid=$event"
-                      v-on:input-email="f.email=$event"
-                      v-on:add="addField(s[n-1].fields, f);alert(f)"
-                      v-on:remove="removeField(s[n-1].fields, f)"
-                      v-on:up="sortFieldUp(s[n-1].fields, f)"
-                      v-on:down="sortFieldDown(s[n-1].fields, f)"
-                      v-on:entity-validation="f.warning=$event"
-                    ></ph-entity>
-                  </v-flex>
-
-                  <v-flex xs12 v-else-if="f.component === 'project'">
-                    <ph-project
-                      v-bind.sync="f"
-                      v-on:input-project="f.project=$event; "
-                      v-on:input-agency="f.agency=$event; "
-                      v-on:validation="f.warning=$event"
-                      v-on:add="addField(s[n-1].fields, f)"
-                      v-on:remove="removeField(s[n-1].fields, f)"
-                      v-on:up="sortFieldUp(s[n-1].fields, f)"
-                      v-on:down="sortFieldDown(s[n-1].fields, f)"
-                    ></ph-project>
-                  </v-flex>
-
-                  <v-flex v-else-if="f.component === 'p-select'">
-                    <p-i-select
-                      v-bind.sync="f"
-                      v-on:input="selectInput(f, $event)"
-                      v-on:add="addField(s.fields, f)"
-                      v-on:remove="removeField(s.fields, f)"
-                      v-on:validation="f.warning=$event"
-                    ></p-i-select>
-                  </v-flex>
-                </v-layout>
-              </v-flex>
-
-              <v-flex v-else-if="s[n-1].id== 'file'">
-                <v-layout align-center justify-center class="ma-0 pa-0">
-                  <v-flex>
-                    <div class="text-xs-right">
-                      <v-btn @click="stepper = n-1">Back</v-btn>
-                      <v-btn color="primary" @click="stepper = n+1">Continue</v-btn>
-                    </div>
-                  </v-flex>
-                </v-layout>
-
-                <v-card-text>
-                  <v-layout v-for="(f) in s[n-1].fields" :key="f.id" row wrap>
-                    <v-flex v-if="f.component == 'files'">
-                      <ph-files
-                        v-bind.sync="f"
-                        v-on:input-numberFiles="f.nfile=$event"
-                        v-on:input-file="f.file=$event"
-                        v-on:input-name="f.fileName=$event"
-                        v-on:input-type="f.fileFormat=$event"
-                        v-on:input-extension="f.fileExtension=$event"
-                        v-on:input-description="f.fileDescription=$event"
-                        v-on:validation="f.warning=$event"
-                      ></ph-files>
-                    </v-flex>
-                  </v-layout>
-                </v-card-text>
-              </v-flex>
-
-              <v-flex v-else-if="s[n-1].id== 'content'">
-                <v-layout align-center justify-center fill-height>
-                  <v-flex>
-                    <v-toolbar dense flat color="white">
-                      <v-toolbar-title class="title">
-                        Fill-in the metadata for the research collection: {{$store.state.metadataInputs.containerTitle}}
-                        {{$store.state.metadataInputs.filesTitle}}
-                      </v-toolbar-title>
-                      <v-spacer></v-spacer>
-                      <v-toolbar-items>
-                        <v-btn @click="stepper = n-1">Back</v-btn>
-                      </v-toolbar-items>
-                    </v-toolbar>
-                  </v-flex>
-                </v-layout>
-
-                <v-layout row>
-                  <v-flex xs3>
-                    <v-navigation-drawer permanent>
-                      <v-list>
-                        <v-item-group v-model="window">
-                          <v-item v-for="(c) in s[n-1].categories" :key="c.id">
-                            <div slot-scope="{ active, toggle }">
-                              <v-list-tile @click="toggle">
-                                <v-list-tile-content>{{c.question}}</v-list-tile-content>
-                              </v-list-tile>
-                            </div>
-                          </v-item>
-                        </v-item-group>
-                      </v-list>
-                    </v-navigation-drawer>
-                  </v-flex>
-                  <v-flex xs12>
-                    <v-window v-model="window" class="mx-0">
-                      <v-window-item v-for="(c) in s[n-1].categories" :key="c.id">
-                        <v-card-title class="title">{{c.description}}</v-card-title>
-                        <!-- <v-flex v-if="ticked[index]==true">-->
-                        <v-layout v-for="(f,index) in c.fields" :key="index">
-                          <v-flex v-if="f.component=='ext-service'&&f.visible==true">
-                            <ph-ext-service
-                              v-bind.sync="f"
-                              v-on:input-value="f.value=$event"
-                              v-on:add-textfield="changeFieldToText(c.fields, f)"
-                            ></ph-ext-service>
-                          </v-flex>
-                          <!--   f.category {{f.category}} f.description {{f.description}}
-                          store {{$store.state.metadataInputs[f.category]}}-->
-                          <v-flex v-if="f.component == 'text-field'&&f.visible==true">
-                            <ph-text-field
-                              v-bind.sync="f"
-                              :multiplicable="true"
-                              v-on:input="f.value=$event"
-                              v-on:add="addField(c.fields, f)"
-                              v-on:remove="removeField(c.fields, f)"
-                            ></ph-text-field>
-                          </v-flex>
-
-                          <v-flex v-if=" f.component == 'selection'&&f.visible==true">
-                            <ph-selection
-                              v-bind.sync="f"
-                              :required="false"
-                              :field="[]"
-                              :commit="true"
-                              :freeField="f.freefield"
-                              :text="'skos:prefLabel'"
-                              :nested="['@value']"
-                              v-on:input-select="f.value=$event;updateSubfields(f.multiplicable,c.fields,f)"
-                              :freeText="{'@type': [f.subjectType],'skos:prefLabel': [{'@value':''}]}"
-                            ></ph-selection>
-                          </v-flex>
-
-                          <!--   <v-flex v-if=" f.component == 'assay-selection'&&f.visible==true">
-                            <ph-assay-selection
-                              v-bind.sync="f"
-                              :required="false"
-                              :field="[f.default]"
-                              :commit="true"
-                              :freeField="true"
-                              :text="'skos:prefLabel'"
-                              :nested="['@value']"
-                              v-on:input-select="f.value=$event;"
-                              :freeText="{'@type': [f.subjectType],'skos:prefLabel': [{'@value':''}]}"
-                            ></ph-assay-selection>
-                          </v-flex>-->
-
-                          <v-layout
-                            row
-                            wrap
-                            v-if="f.visible==false&&$store.state.metadataInputs[f.category[0]]&&$store.state.metadataInputs[f.category[0]].indexOf(f.description)>=0"
-                          >
-                            <v-card-title
-                              v-if="f.category[0]=='biologicalMacromolecule'&&c.fields[index-1].description!=f.description"
-                              class="title"
-                            >{{f.description}}</v-card-title>
-                            <v-flex offset-xs2 xs10>
-                              <ph-ext-service
-                                v-if="f.component=='ext-service'"
-                                v-bind.sync="f"
-                                v-on:input-value="f.value=$event"
-                                v-on:add-textfield="changeFieldToText(c.fields, f)"
-                              ></ph-ext-service>
-
-                              <ph-text-field
-                                v-if="f.component=='text-field'"
-                                v-bind.sync="f"
-                                :multiplicable="true"
-                                v-on:input="f.value=$event"
-                                v-on:input-language="f.language=$event"
-                                v-on:add="addField(c.fields, f)"
-                                v-on:remove="removeField(c.fields, f)"
-                              ></ph-text-field>
-
-                              <ph-selection
-                                v-if="f.component=='selection'"
-                                v-bind.sync="f"
-                                :required="false"
-                                :field="[]"
-                                :commit="true"
-                                :freeField="true"
-                                :text="'skos:prefLabel'"
-                                :nested="['@value']"
-                                v-on:input-select="f.value=$event;updateSubfields(f.multiplicable,c.fields,f)"
-                                :freeText="{  '@type': [f.subjectType],
-          'skos:prefLabel': [{'@value':''}]}"
-                              ></ph-selection>
-                            </v-flex>
-                          </v-layout>
-
-                          <!--  <v-flex v-if=" f.component == 'select'">
-                           
-                            <ph-select
-                              v-bind.sync="f"
-                              v-on:input-value="f.value=$event"
-                              v-on:input-checkbox="f.checkbox=$event"
-                              v-on:add="addField(s.fields, f)"
-                              v-on:remove="removeField(s.fields, f)"
-                            ></ph-select>
-                          </v-flex>-->
-                        </v-layout>
-                      </v-window-item>
-                    </v-window>
-                  </v-flex>
-                </v-layout>
-              </v-flex>
-            </v-stepper-content>
-          </v-stepper-items>
-        </v-stepper>
-
-        <v-layout align-center justify-end row class="ma-3">
-          <v-dialog v-if="templating" v-model="templatedialog" width="500">
-            <v-btn
-              class="mr-3"
-              slot="activator"
-              dark
-              raised
-              :loading="loading"
-              :disabled="loading"
-              color="grey"
-            >Save as template</v-btn>
-            <v-card>
-              <v-card-title class="headline grey lighten-2" primary-title>
-                <span v-t="'Save as template'"></span>
-              </v-card-title>
-              <v-card-text>
-                <v-text-field v-model="templatename" :label="$t('Template name')"></v-text-field>
-              </v-card-text>
-              <v-card-actions>
-                <v-spacer></v-spacer>
-                <v-btn
-                  :loading="loading"
-                  :disabled="loading"
-                  color="grey"
-                  dark
-                  @click="templatedialog= false"
-                >
-                  <span v-t="'Cancel'"></span>
-                </v-btn>
-                <v-btn :loading="loading" :disabled="loading" color="primary">
-                  <span v-t="'Save'"></span>
-                </v-btn>
-              </v-card-actions>
-            </v-card>
-          </v-dialog>
-          <v-btn
-            v-if="targetpid"
-            raised
-            :loading="loading"
-            :disabled="loading"
-            color="primary"
-            @click="save()"
-          >
-            <span v-t="'Save'"></span>
-          </v-btn>
-          <v-btn
-            v-else
-            raised
-            :loading="loading"
-            :disabled="loading"
-            color="primary"
-            @click="checkWarnings()"
-          >
-            <span v-t="'Submit'"></span>
-          </v-btn>
-        </v-layout>
+     
+        <ph-input-form
+        :model="model"
+          :form="form"
+          :loading="loading"
+          :templating="templating"
+          :jsondata="getMetadata()"
+          :targetpid="targetpid"
+          v-on:submit="checkWarnings()"
+        ></ph-input-form>
       </v-tab-item>
       <!--second tab-->
       <v-tab-item class="ma-4">
@@ -369,95 +43,14 @@ import VueJsonPretty from "vue-json-pretty";
 import arrays from "../../utils/arrays";
 import jsonLd from "../../utils/json-ld";
 import fields from "../../utils/fields";
-import PhTextField from "./pharma-input-fields/PhTextField";
-import PhTextFieldSuggest from "./pharma-input-fields/PhTextFieldSuggest";
-import PhTitle from "./pharma-input-fields/PhTitle";
-import PhEntity from "./pharma-input-fields/PhEntity";
-import PhProject from "./pharma-input-fields/PhProject";
-import PhExtService from "./pharma-input-fields/PhExtService";
-import PhFiles from "./pharma-input-fields/PhFiles";
-import PhSelection from "./pharma-input-fields/PhSelection";
-import PhSelectionProj from "./pharma-input-fields/PhSelectionProj";
-import PhAssaySelection from "./pharma-input-fields/PhAssaySelection";
-import PhDate from "./pharma-input-fields/PhDate";
-import PISelect from "./pharma-input-fields/PISelect";
-//import PITitle from "./PITitle";
-//import PIFile from "./PIFile";
-/*import PITextField from './PITextField'
-import PITextFieldSuggest from './PITextFieldSuggest'
-import PITitle from './PITitle'
-import PIEntity from './PIEntity'
-import PIDateEdtf from './PIDateEdtf'
-import PISelect from './PISelect'
-import PISelectText from './PISelectText'
-import PISubjectGnd from './PISubjectGnd'
-import PISpatialGetty from './PISpatialGetty'
-import PISpatialText from './PISpatialText'
-import PIDimension from './PIDimension'
-import PIDuration from './PIDuration'
-import PIProject from './PIProject'
-import PIFunder from './PIFunder'
-import PIAssociation from './PIAssociation'
-import PISeries from './PISeries'
-import PICitation from './PICitation'
-import PIBfPublication from './PIBfPublication'
-import PIAdaptation from './PIAdaptation'
-import PIFilenameReadonly from './PIFilenameReadonly'
-import PIFile from './PIFile'
-import PISpatialGettyReadonly from './PISpatialGettyReadonly'
-import PIVocabExtReadonly from './PIVocabExtReadonly'
-import PIUnknownReadonly from './PIUnknownReadonly'
-import PILiteral from './PILiteral'
-import PIStudyPlan from './PIStudyPlan'
-import PIKeyword from './PIKeyword'
-import PTList from '../templates/PTList'*/
+
+import PhInputForm from "./pharma-input-fields/PhInputForm";
 
 export default {
   name: "ph-submit",
   components: {
-    PhTextField,
-    PhTextFieldSuggest,
-    PhTitle,
-    PhEntity,
-    PhProject,
-    PhExtService,
-    PhFiles,
-    PhSelection,
-    PhSelectionProj,
-    PhDate,
-    PhAssaySelection,
-    PISelect,
-    //PITitle,
-    //PIFile,
-    /* PITextField,
-    PITextFieldSuggest,
-    PITitle,
-    PIEntity,
-    PIDateEdtf,
-    PISelect,
-    PISelectText,
-    PISubjectGnd,
-    PISpatialGetty,
-    PISpatialText,
-    PIDimension,
-    PIDuration,
-    PIStudyPlan,
-    PIProject,
-    PIFunder,
-    PIAssociation,
-    PISeries,
-    PICitation,
-    PIBfPublication,
-    PIAdaptation,
-    PILiteral,
-    PIKeyword,
-    PIFilenameReadonly,
-    PIFile,
-    PIVocabExtReadonly,
-    PISpatialGettyReadonly,
-    PIUnknownReadonly,
-    VueJsonPretty,
-    PTList*/
+    PhInputForm,
+
     VueJsonPretty
   },
   props: {
@@ -467,6 +60,10 @@ export default {
         sections: []
       }
     },
+    model: {
+      type: String,
+      default: "https://pid.phaidra.org/vocabulary/8MY0-BQDQ"
+    },
     targetpid: {
       type: String
     },
@@ -485,17 +82,6 @@ export default {
     }
   },
   computed: {
-    activeTabs: function() {
-      var sections = this.form.sections;
-
-      return sections.filter(function(section) {
-        return section.isActive;
-      });
-    },
-
-    sectionNumbers: function() {
-      return this.activeTabs.length;
-    },
     submittype: function() {
       for (let s of this.form.sections) {
         if (s.fields && s.type !== "member") {
@@ -539,10 +125,7 @@ export default {
       previewMember: "",
       searchfieldsinput: "",
       metadatapreview: {},
-      window: 0,
-      ticked: [],
-      stepper: 1,
-      steps: 3
+      ticked: []
     };
   },
   methods: {
@@ -554,15 +137,47 @@ export default {
       console.log("file", e);
     },
 
-    getTitle: function(n) {
-      if (this.form.sections[n]) {
-        return this.form.sections[n].title;
-      } else {
-        // console.log("no title", n, "here", this.form.sections);
-      }
+    loadTemplates: function() {
+      this.$refs.templates.loadTemplates();
+    },
+    loadTemplate: function(form) {
+      this.$emit("load-form", form);
+      this.activetab = 0;
+    },
+    saveAsTemplate: function() {
+      var self = this;
+      var httpFormData = new FormData();
+      this.loading = true;
+      httpFormData.append("name", this.templatename);
+      httpFormData.append("form", JSON.stringify(this.form));
+      var url =
+        self.$store.state.settings.instance.api + "/jsonld/template/add";
+      var promise = fetch(url, {
+        method: "POST",
+        mode: "cors",
+        headers: {
+          "X-XSRF-TOKEN": this.$store.state.user.token
+        },
+        body: httpFormData
+      })
+        .then(function(response) {
+          return response.json();
+        })
+        .then(function(json) {
+          if (json.alerts && json.alerts.length > 0) {
+            self.$store.commit("setAlerts", json.alerts);
+          }
+          self.loading = false;
+          self.templatedialog = false;
+        })
+        .catch(function(error) {
+          //console.log(error)
+        });
+      return promise;
     },
     getMetadata: function() {
       let jsonlds;
+
       if (!this.targetpid && this.submittype === "container") {
         jsonlds = jsonLd.containerForm2json(this.form);
       } else {
@@ -601,46 +216,10 @@ export default {
       if (this.owner) {
         md["metadata"]["ownerid"] = this.owner;
       }
+
       return md;
     },
-    loadTemplates: function() {
-      this.$refs.templates.loadTemplates();
-    },
-    loadTemplate: function(form) {
-      this.$emit("load-form", form);
-      this.activetab = 0;
-    },
-    saveAsTemplate: function() {
-      var self = this;
-      var httpFormData = new FormData();
-      this.loading = true;
-      httpFormData.append("name", this.templatename);
-      httpFormData.append("form", JSON.stringify(this.form));
-      var url =
-        self.$store.state.settings.instance.api + "/jsonld/template/add";
-      var promise = fetch(url, {
-        method: "POST",
-        mode: "cors",
-        headers: {
-          "X-XSRF-TOKEN": this.$store.state.user.token
-        },
-        body: httpFormData
-      })
-        .then(function(response) {
-          return response.json();
-        })
-        .then(function(json) {
-          if (json.alerts && json.alerts.length > 0) {
-            self.$store.commit("setAlerts", json.alerts);
-          }
-          self.loading = false;
-          self.templatedialog = false;
-        })
-        .catch(function(error) {
-          //console.log(error)
-        });
-      return promise;
-    },
+
     getObjectType: function(contentmodel) {
       switch (contentmodel) {
         case "https://pid.phaidra.org/vocabulary/44TN-P1S0":
@@ -657,11 +236,13 @@ export default {
           return "unknown";
       }
     },
-    submit: function() {
+    submit: async function() {
       var self = this;
       this.loading = true;
       var httpFormData = new FormData();
       httpFormData.append("metadata", JSON.stringify(self.getMetadata()));
+
+      //console.log("httpFormData", self.getMetadata());
       if (this.submittype === "container") {
         for (var i = 0; i < this.form.sections.length; i++) {
           var s = this.form.sections[i];
@@ -699,6 +280,14 @@ export default {
           }
         }
       }
+      /*console.log(
+        "posting",
+        self.$store.state.settings.instance.api +
+          "/" +
+          this.submittype +
+          "/create",
+        httpFormData
+      );*/
       fetch(
         self.$store.state.settings.instance.api +
           "/" +
@@ -776,353 +365,31 @@ export default {
       this.metadatapreview = this.getMetadata();
       this.$refs.prettyprint.$forceUpdate();
     },
-    changeFieldToText: function(arr, f) {
-      var newField = arrays.duplicate(arr, f);
-
-      if (newField) {
-        newField.id = new Date().getTime();
-        newField.removable = true;
-        newField.component = "text-field";
-        newField.predicate = "dcterms:subject";
-        newField.type = f.subjectType;
-        newField.removable = true;
-        if (newField.multiplicable) {
-          newField.multiplicable = true;
-        }
-
-        if (newField.value) {
-          newField.value = "";
-        }
-        if (newField.text) {
-          newField.text = "";
-        }
-        if (newField.ontClass) {
-          delete newField.ontClass;
-        }
-        if (newField.ontology) {
-          delete newField.ontology;
-        }
-        if (newField.topId) {
-          delete newField.topId;
-        }
-      }
-    },
-    addField: function(arr, f) {
-      var newField = arrays.duplicate(arr, f);
-
-      if (newField) {
-        newField.id = new Date().getTime();
-        // if (newField.removable) {
-        newField.removable = true;
-        //}
-        if (newField.value) {
-          newField.value = "";
-        }
-        if (newField.firstname) {
-          newField.firstname = "";
-        }
-        if (newField.lastname) {
-          newField.lastname = "";
-        }
-
-        if (newField.email) {
-          newField.email = "";
-        }
-        if (newField.orcid) {
-          newField.orcid = "";
-        }
-        if (newField.institution) {
-          newField.institution = [
-            { "@id": "univie", "skos:prefLabel": "University of Vienna" }
-          ];
-        }
-        if (newField.project) {
-          newField.project = [
-            {
-              "@type": "foaf:Project",
-              "skos:prefLabel": [
-                {
-                  "@value": "",
-                  "@language": "en"
-                }
-              ],
-              "rdfs:comment": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "foaf:homepage": [""],
-              "skos:notation": [""]
-            }
-          ];
-        }
-        if (newField.agency) {
-          newField.agency = [
-            {
-              "@type": "frapo:FundingAgency",
-              "skos:prefLabel": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "skos:exactMatch": [""]
-            }
-          ];
-        }
-      }
-    },
-    removeField: function(arr, f) {
-      arrays.remove(arr, f);
-    },
-    updateSubfields: function(mult, arr, el) {
-      if (mult) {
-        var self = this;
-        //console.log("el", el.category[0], el.subcategory[0]);
-        //for all the input fields in this category, clear the value of all the ones
-        // where f.description is not in  $store.state.metadataInputs[f.category]
-        var sub = [];
-        //filter - get all the ones (array sub) with matching category
-        //if there is a subcategory (like  organism_assayTarget) that's the one we want to filter
-        if (el.subcategory) {
-          sub = arr.filter(function(a) {
-            if (a.category) {
-              return a.category[0] === el.subcategory[0];
-            }
-          });
-        } else {
-          sub = arr.filter(function(a) {
-            if (a.category) {
-              return a.category[0] === el.category[0];
-            }
-          });
-        }
-
-        for (var a2 in sub) {
-          if (
-            self.$store.state.metadataInputs[el.category[0]].indexOf(
-              sub[a2].description
-            ) < 0 &&
-            sub[a2].description != "selection"
-          ) {
-            sub[a2].value = "";
-            sub[a2].text = "";
-            //and remove the value of the subfields, if there are some
-
-            if (sub[a2].subcategory) {
-              this.$store.commit(sub[a2].stateVoc, []);
-              //then clear all the subcategories
-              for (var b in sub) {
-                if (sub[b].category[0] === sub[a2].subcategory[0]) {
-                  //it's a subcategory of what we selected
-                  //clear values and store
-
-                  sub[b].value = "";
-                  sub[b].text = "";
-                }
-              }
-            }
-          } else {
-          }
-
-          /* if (
-            self.$store.state.metadataInputs[el.category[1]].indexOf(
-              sub[a2].description
-            ) < 0 &&
-            sub[a2].description != "selection"
-          ) {
-            console.log("remove 2", sub[a2].label);
-            //remove the value of those
-            //sub[a2].value = "";
-            //sub[a2].text = "";
-            //and remove the value of the subfields, if there are some
-            //that would be the array elements [i] with i>0 in sub[a2].category
-          }*/
-          //else {
-          //}
-        }
-      } else {
-        //console.log("doing nothing");
-      }
-    },
-    sortFieldUp: function(arr, f) {
-      var i = arr.indexOf(f);
-      if (arr[i - 1]) {
-        if (arr[i - 1].ordergroup === f.ordergroup) {
-          arrays.moveUp(arr, f);
-        }
-      }
-    },
-    sortFieldDown: function(arr, f) {
-      var i = arr.indexOf(f);
-      if (arr[i + 1]) {
-        if (arr[i + 1].ordergroup === f.ordergroup) {
-          arrays.moveDown(arr, f);
-        }
-      }
-    },
-    setSelected: function(f, property, event) {
-      //if (event) {
-      // console.log("setselected", property, f);
-      f[property] = event["@id"];
-      //}
 
-      this.$emit("form-input-" + f.component, f);
-    },
-    /*
-    addField: function(arr, f) {
-      var newField = arrays.duplicate(arr, f);
-      if (newField) {
-        newField.id = new Date().getTime();
-        newField.removable = true;
-      }
-    },
-    removeField: function(arr, f) {
-      arrays.remove(arr, f);
-    },
-    sortFieldUp: function(arr, f) {
-      var i = arr.indexOf(f);
-      if (arr[i - 1]) {
-        if (arr[i - 1].ordergroup === f.ordergroup) {
-          arrays.moveUp(arr, f);
-        }
-      }
-    },
-    sortFieldDown: function(arr, f) {
-      var i = arr.indexOf(f);
-      if (arr[i + 1]) {
-        if (arr[i + 1].ordergroup === f.ordergroup) {
-          arrays.moveDown(arr, f);
-        }
-      }
-    },
-    sortMemberUp: function(s) {
-      var i = this.form.sections.indexOf(s);
-      if (this.form.sections[i - 1]) {
-        if (this.form.sections[i - 1].type === "member") {
-          arrays.moveUp(this.form.sections, s);
-        }
-      }
-    },
-    sortMemberDown: function(s) {
-      var i = this.form.sections.indexOf(s);
-      if (this.form.sections[i + 1]) {
-        if (this.form.sections[i + 1].type === "member") {
-          arrays.moveDown(this.form.sections, s);
-        }
-      }
-    },
-    addSection: function(s) {
-      var ns = arrays.duplicate(this.form.sections, s);
-      ns.id = new Date().getTime();
-      ns.removable = true;
-      for (var i = 0; i < ns.fields.length; i++) {
-        var id = new Date().getTime();
-        if (i > 0) {
-          id = ns.fields[i - 1].id + 1;
-        }
-        ns.fields[i].id = id;
-        ns.fields[i].value = "";
-        ns.fields[i].language = "";
-      }
-    },
-    removeSection: function(s) {
-      arrays.remove(this.form.sections, s);
-    },
-    
-    updateSubject: function(f, event) {
-      f["skos:prefLabel"] = event["skos:prefLabel"];
-      if (f["skos:prefLabel"]) {
-        if (f["skos:prefLabel"].length > 0) {
-          // needed to init the search input if loading from template
-          // will be synced with component's initquery prop
-          f.initquery = f["skos:prefLabel"][0]["@value"];
-        }
-      }
-      f["rdfs:label"] = event["rdfs:label"];
-      this.$emit("form-input-" + f.component, f);
-    },
-    updatePlace: function(f, event) {
-      f["skos:prefLabel"] = event["skos:prefLabel"];
-      if (f["skos:prefLabel"]) {
-        if (f["skos:prefLabel"].length > 0) {
-          // needed to init the search input if loading from template
-          // will be synced with component's initquery prop
-          f.initquery = f["skos:prefLabel"][0]["@value"];
-        }
-      }
-      f["rdfs:label"] = event["rdfs:label"];
-      f.coordinates = event.coordinates;
-      this.$emit("form-input-" + f.component, f);
-    },*/
-    selectInput: function(f, event) {
-      if (event) {
-        f.value = event["@id"];
-        if (event["@type"]) {
-          f.type = event["@type"];
-        }
-        var preflabels = event["skos:prefLabel"];
-        f["skos:prefLabel"] = [];
-        Object.entries(preflabels).forEach(([key, value]) => {
-          f["skos:prefLabel"].push({ "@value": value, "@language": key });
-        });
-        var rdfslabels = event["rdfs:label"];
-        if (rdfslabels) {
-          f["rdfs:label"] = [];
-          Object.entries(rdfslabels).forEach(([key, value]) => {
-            f["rdfs:label"].push({ "@value": value, "@language": key });
-          });
-        }
-        f["skos:notation"] = event["skos:notation"];
-      } else {
-        f.value = "";
-        f["skos:prefLabel"] = [];
-      }
-      this.$emit("form-input-" + f.component, f);
-    },
-    /*
-    roleInput: function(f, event) {
-      f.role = event["@id"];
-      f["skos:prefLabel"] = event["skos:prefLabel"];
-      this.$emit("form-input-" + f.component, f);
-    },
-    setFilename: function(f, event) {
-      f.value = event.target.files[0].name;
-      f.file = event.target.files[0];
-      this.$emit("form-input-" + f.component, f);
-    },
-    addFieldAutocompleteFilter: function(item, queryText) {
-      const lab = this.$t(item["fieldname"]).toLowerCase();
-      const query = queryText.toLowerCase();
-      return lab.indexOf(query) > -1;
-    },
-    removeFieldChip(item) {
-      const index = this.addfieldselection.indexOf(item);
-      if (index >= 0) this.addfieldselection.splice(index, 1);
-    },
-    addFields(section) {
-      for (var i = 0; i < this.addfieldselection.length; i++) {
-        let f = fields.getField(this.addfieldselection[i].id);
-        f.removable = true;
-        section.fields.push(f);
-      }
-      this.addfieldselection = [];
-      section["adddialogue"] = false;
-    },*/
     checkWarnings: function() {
       var self = this;
       let missingF = [];
-
+      //this.submit();
+      var w = false;
       for (var section in self.s) {
         let fields = self.s[section].fields;
 
         for (var f in fields) {
-          var w = false;
-
           if (fields[f].warning === true) {
             w = true;
-            missingF.push(fields[f].label);
+
+            missingF.push(" " + fields[f].label);
+          }
+          if (fields[f].licenseWarning) {
+            var nwf = false;
+            // = 0; i < this.form.sections.length; i++
+            for (var wf = 0; wf < fields[f].licenseWarning.length; wf++) {
+              if (fields[f].licenseWarning[wf] == true) {
+                var new_wf = wf + 1;
+                missingF.push(" Missing licenses for file: " + new_wf);
+                w = true;
+              }
+            }
           }
         }
       }
@@ -1130,7 +397,7 @@ export default {
         let str = missingF.toString();
 
         self.$store.commit("setAlerts", [
-          { type: "danger", msg: "Missing required fields: " + str }
+          { type: "danger", msg: "Missing required fields:" + str }
         ]);
         self.loading = false;
         self.$vuetify.goTo(0);
@@ -1139,21 +406,6 @@ export default {
         self.$store.commit("setAlerts", []);
         this.submit();
       }
-    },
-
-    warning: function(section) {
-      var fields = section.fields;
-
-      var w = false;
-      for (var f in fields) {
-        //console.log("field w", fields[f]);
-        if (!fields[f].warning) {
-          w = false;
-        } else if (fields[f].warning === true) {
-          w = true;
-        }
-      }
-      return w;
     }
   },
   mounted: function() {
diff --git a/src/components/input/phaidra_inputs/PIAssociation.vue b/src/components/input/phaidra_inputs/PIAssociation.vue
index dfb051707d5be53516f62113cc6aeb13a49e93c6..f5361b73d6d8fe8ebfb910bab77fccdd24da70c7 100644
--- a/src/components/input/phaidra_inputs/PIAssociation.vue
+++ b/src/components/input/phaidra_inputs/PIAssociation.vue
@@ -46,78 +46,85 @@
 </template>
 
 <script>
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-association',
+  name: "p-i-association",
   mixins: [fieldproperties],
   methods: {
-    autocompleteFilter: function (item, queryText) {
-      const lab = item['skos:prefLabel'][this.$i18n.locale] ? item['skos:prefLabel'][this.$i18n.locale].toLowerCase() : item['skos:prefLabel']['eng'].toLowerCase()
-      const query = queryText.toLowerCase()
-      return lab.indexOf(query) > -1
+    autocompleteFilter: function(item, queryText) {
+      const lab = item["skos:prefLabel"][this.$i18n.locale]
+        ? item["skos:prefLabel"][this.$i18n.locale].toLowerCase()
+        : item["skos:prefLabel"]["eng"].toLowerCase();
+      const query = queryText.toLowerCase();
+      return lab.indexOf(query) > -1;
     },
-    getTerm: function (v) {
+    getTerm: function(v) {
       for (let u of this.orgunits) {
-        if (u['@id'] === v){
-          return u
+        if (u["@id"] === v) {
+          return u;
         }
       }
     },
-    getLocalizedTermLabel: function (item) {
-      return item['skos:prefLabel'][this.$i18n.locale] ? item['skos:prefLabel'][this.$i18n.locale] : item['skos:prefLabel']['eng']
+    getLocalizedTermLabel: function(item) {
+      return item["skos:prefLabel"][this.$i18n.locale]
+        ? item["skos:prefLabel"][this.$i18n.locale]
+        : item["skos:prefLabel"]["eng"];
     },
-    addToOrgunits: function (units, parent) {
+    addToOrgunits: function(units, parent) {
       for (let u of units) {
-        this.orgunits.push(u)
-        u.parent = parent
-        if (u['subunits']) {
+        this.orgunits.push(u);
+        u.parent = parent;
+        if (u["subunits"]) {
           if (u.subunits.length > 0) {
-            this.addToOrgunits(u.subunits, u)
+            this.addToOrgunits(u.subunits, u);
           }
         }
       }
     },
-    handleInput: function (unit) {
-      this.path = ''
-      let parentpath = []
-      this.getParentPath(unit, parentpath)
+    handleInput: function(unit) {
+      this.path = "";
+      let parentpath = [];
+      this.getParentPath(unit, parentpath);
       for (let u of parentpath.reverse()) {
-        this.path = this.path + u['skos:prefLabel'][this.$i18n.locale] + ' > '
+        this.path = this.path + u["skos:prefLabel"][this.$i18n.locale] + " > ";
       }
-      this.path = this.path + unit['skos:prefLabel'][this.$i18n.locale]
-      this.$emit('input', unit)
+      this.path = this.path + unit["skos:prefLabel"][this.$i18n.locale];
+      this.$emit("input", unit);
     },
-    getParentPath: function (unit, parentpath) {
-      if (unit['parent']) {
-        parentpath.push(unit.parent)
-        this.getParentPath(unit.parent, parentpath)
+    getParentPath: function(unit, parentpath) {
+      if (unit["parent"]) {
+        parentpath.push(unit.parent);
+        this.getParentPath(unit.parent, parentpath);
       }
     },
-    loadOrgUnits: function () {
-      var self = this
-      this.loading = true
-      var url = self.$store.state.settings.instance.api + '/directory/org_get_units'
+    loadOrgUnits: function() {
+      var self = this;
+      this.loading = true;
+      var url =
+        self.$store.state.settings.instance.api + "/directory/org_get_units";
       var promise = fetch(url, {
-        method: 'GET',
-        mode: 'cors',
+        method: "GET",
+        mode: "cors",
         headers: {
-          'X-XSRF-TOKEN': this.$store.state.user.token
+          "X-XSRF-TOKEN": this.$store.state.user.token
         }
       })
-      .then(function (response) { return response.json() })
-      .then(function (json) {
-        if (json.alerts && json.alerts.length > 0) {
-          self.$store.commit('setAlerts', json.alerts)
-        }
-        self.loading = false
-        self.templatedialog = false
-        self.addToOrgunits(json.units, null)
-      })
-      .catch(function (error) {
-        console.log(error)
-      })
-      return promise
+        .then(function(response) {
+          return response.json();
+        })
+        .then(function(json) {
+          if (json.alerts && json.alerts.length > 0) {
+            self.$store.commit("setAlerts", json.alerts);
+          }
+          self.loading = false;
+          self.templatedialog = false;
+          self.addToOrgunits(json.units, null);
+        })
+        .catch(function(error) {
+          console.log(error);
+        });
+      return promise;
     }
   },
   props: {
@@ -136,26 +143,26 @@ export default {
       default: false
     }
   },
-  data () {
+  data() {
     return {
       loading: false,
       orgunits: [],
-      path: ''
-    }
+      path: ""
+    };
   },
-  mounted: function () {
-    this.$nextTick(function () {
-      let self = this
-      this.loadOrgUnits().then(function () { 
+  mounted: function() {
+    this.$nextTick(function() {
+      let self = this;
+      this.loadOrgUnits().then(function() {
         if (self.value) {
-          let term = self.getTerm(self.value)
+          let term = self.getTerm(self.value);
           // emit input to set skos:prefLabel in parent
-          self.handleInput(term)
+          self.handleInput(term);
         }
-      })
-    })
+      });
+    });
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIBfPublication.vue b/src/components/input/phaidra_inputs/PIBfPublication.vue
index fd62ca8adf2bf35ee5da33ee9de54a1ebd213ca8..bfc0d40aa36cb1d11ef99798eafee2556fb60952 100644
--- a/src/components/input/phaidra_inputs/PIBfPublication.vue
+++ b/src/components/input/phaidra_inputs/PIBfPublication.vue
@@ -61,12 +61,12 @@
 </template>
 
 <script>
-import qs from 'qs'
-import { fieldproperties } from '../../mixins/fieldproperties'
-import { validationrules } from '../../mixins/validationrules'
+import qs from "qs";
+import { fieldproperties } from "../../../mixins/fieldproperties";
+import { validationrules } from "../../../mixins/validationrules";
 
 export default {
-  name: 'p-i-bf-publication',
+  name: "p-i-bf-publication",
   mixins: [validationrules, fieldproperties],
   props: {
     publisherName: {
@@ -95,7 +95,7 @@ export default {
       type: Boolean
     }
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIContainedIn.vue b/src/components/input/phaidra_inputs/PIContainedIn.vue
new file mode 100644
index 0000000000000000000000000000000000000000..937ebf41a72ce445670573cb329f4ac1e838c4a3
--- /dev/null
+++ b/src/components/input/phaidra_inputs/PIContainedIn.vue
@@ -0,0 +1,408 @@
+<template>
+
+  <v-row>
+    <v-col cols="12">
+      <v-card >
+        <v-card-title class="title font-weight-light grey white--text">
+            <span>{{ $t(label) }}</span>
+        </v-card-title>
+        <v-divider></v-divider>
+        <v-card-text class="mt-4">
+          <v-row>
+            <v-col>
+              <v-row >
+                <v-col cols="12" :md="multilingual ? 4 : 6">
+                  <v-text-field
+                    :value="title"
+                    :label="$t('Title')"
+                    v-on:blur="$emit('input-title',$event.target.value)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                </v-col>
+                <v-col cols="12" :md="multilingual ? 4 : 6">
+                  <v-text-field
+                    :value="subtitle"
+                    :label="$t('Subtitle')"
+                    v-on:blur="$emit('input-subtitle',$event.target.value)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                </v-col>
+                <v-col cols="4" v-if="multilingual">
+                  <v-autocomplete
+                    :value="getTerm('lang', titleLanguage)"
+                    v-on:input="$emit('input-title-language', $event)"
+                    :items="vocabularies['lang'].terms"
+                    :filter="autocompleteFilter"
+                    hide-no-data
+                    :label="$t('Language')"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                    return-object
+                    clearable
+                    :item-value="'@id'"
+                  >
+                    <template slot="item" slot-scope="{ item }">
+                      <v-list-item-content two-line>
+                        <v-list-item-title  v-html="`${getLocalizedTermLabel('lang', item['@id'])}`"></v-list-item-title>
+                        <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                      </v-list-item-content>
+                    </template>
+                    <template slot="selection" slot-scope="{ item }">
+                      <v-list-item-content>
+                        <v-list-item-title v-html="`${getLocalizedTermLabel('lang', item['@id'])}`"></v-list-item-title>
+                      </v-list-item-content>
+                    </template>
+                  </v-autocomplete>
+                </v-col>
+              </v-row>
+              <v-row v-for="(role, i) in roles" :key="'role'+i">
+                <v-col cols="4">
+                  <v-autocomplete
+                    :disabled="disablerole"
+                    v-on:input="$emit('input-role', { role: role, roleTerm: $event })"
+                    :label="$t('Role')"
+                    :items="vocabularies['rolepredicate'].terms"
+                    :value="getTerm('rolepredicate', role.role)"
+                    :filter="autocompleteFilter"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                    return-object
+                    clearable
+                    :item-value="'@id'"
+                  >
+                    <template slot="item" slot-scope="{ item }">
+                      <v-list-item-content two-line>
+                        <v-list-item-title  v-html="`${getLocalizedTermLabel('rolepredicate', item['@id'])}`"></v-list-item-title>
+                        <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                      </v-list-item-content>
+                    </template>
+                    <template slot="selection" slot-scope="{ item }">
+                      <v-list-item-content>
+                        <v-list-item-title v-html="`${getLocalizedTermLabel('rolepredicate', item['@id'])}`"></v-list-item-title>
+                      </v-list-item-content>
+                    </template>
+                  </v-autocomplete>
+                </v-col>
+                <template v-if="showname">
+                  <v-col cols="4" >
+                    <v-text-field
+                      :value="role.name"
+                      :label="$t('Name')"
+                      v-on:blur="$emit('input-role',{ role: role, name: $event.target.value })"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                    ></v-text-field>
+                  </v-col>
+                </template>
+                <template v-else>
+                  <v-col cols="3">
+                    <v-text-field
+                      :value="role.firstname"
+                      :label="$t('Firstname')"
+                      v-on:blur="$emit('input-role',{ role: role, firstname: $event.target.value })"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                    ></v-text-field>
+                  </v-col>
+                  <v-col cols="3">
+                    <v-text-field
+                      :value="role.lastname"
+                      :label="$t('Lastname')"
+                      v-on:blur="$emit('input-role',{ role: role, lastname: $event.target.value })"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                    ></v-text-field>
+                  </v-col>
+                </template>
+                <v-col cols="1" v-if="roleActions.length">
+                  <v-menu open-on-hover bottom offset-y>
+                    <template v-slot:activator="{ on }">
+                      <v-btn v-on="on" icon>
+                        <v-icon>mdi-dots-vertical</v-icon>
+                      </v-btn>
+                    </template>
+                    <v-list>
+                      <v-list-item v-for="(action, i) in roleActions" :key="i" @click="$emit(action.event, role)">
+                        <v-list-item-title>{{ action.title }}</v-list-item-title>
+                      </v-list-item>
+                    </v-list>
+                  </v-menu>
+                </v-col>
+              </v-row>
+              <v-row>
+                <v-col cols="12" md="6">
+                  <v-text-field
+                    :value="pageStart"
+                    :label="$t(pageStartLabel)"
+                    v-on:blur="$emit('input-page-start',$event.target.value)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                </v-col>
+                <v-col cols="12" md="6">
+                  <v-text-field
+                    :value="pageEnd"
+                    :label="$t(pageEndLabel)"
+                    v-on:blur="$emit('input-page-end',$event.target.value)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                </v-col>
+              </v-row>
+            </v-col>
+          </v-row>
+          <v-row no-gutters>
+            <v-col cols="12">
+              <v-card>
+                <v-card-title class="title font-weight-light grey white--text">
+                  <span>{{ $t(seriesLabel) }}</span>
+                  <v-spacer></v-spacer>
+                  <span>
+                    <v-icon dark v-show="collapseSeriesModel" @click="collapseSeriesModel=!collapseSeriesModel">mdi-arrow-right-drop-circle</v-icon>
+                    <v-icon dark v-show="!collapseSeriesModel" @click="collapseSeriesModel=!collapseSeriesModel">mdi-arrow-down-drop-circle</v-icon>
+                  </span>
+                </v-card-title>
+                <v-card-text class="mt-4" v-show="!collapseSeriesModel">
+                  <v-container>
+                    <v-row >
+                      <v-col cols="12" :md="multilingual ? 10 : 12">
+                        <v-text-field
+                          :value="seriesTitle"
+                          :label="$t('Title')"
+                          v-on:blur="$emit('input-series-title',$event.target.value)"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+                      </v-col>
+                      <v-col cols="12" md="2" v-if="multilingual">
+                        <v-autocomplete
+                          :value="getTerm('lang', seriesTitleLanguage)"
+                          v-on:input="$emit('input-series-title-language', $event )"
+                          :items="vocabularies['lang'].terms"
+                          :item-value="'@id'"
+                          :filter="autocompleteFilter"
+                          hide-no-data
+                          :label="$t('Language')"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                          return-object
+                          clearable
+                        >
+                          <template slot="item" slot-scope="{ item }">
+                            <v-list-item-content two-line>
+                              <v-list-item-title  v-html="`${getLocalizedTermLabel('lang', item['@id'])}`"></v-list-item-title>
+                              <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                            </v-list-item-content>
+                          </template>
+                          <template slot="selection" slot-scope="{ item }">
+                            <v-list-item-content>
+                              <v-list-item-title v-html="`${getLocalizedTermLabel('lang', item['@id'])}`"></v-list-item-title>
+                            </v-list-item-content>
+                          </template>
+                        </v-autocomplete>
+                      </v-col>
+
+                    </v-row>
+
+                    <v-row >
+
+                      <v-col cols="4" v-if="!hideSeriesVolume">
+                        <v-text-field
+                          :value="seriesVolume"
+                          :label="$t('Volume')"
+                          v-on:blur="$emit('input-series-volume',$event.target.value)"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+                      </v-col>
+
+                      <v-col cols="4" v-if="!hideSeriesIssue">
+                        <v-text-field
+                          :value="seriesIssue"
+                          :label="$t('Issue')"
+                          v-on:blur="$emit('input-series-issue',$event.target.value)"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+                      </v-col>
+
+                      <v-col cols="4" v-if="!hideSeriesIssued">
+
+                        <v-text-field
+                          :value="seriesIssued"
+                          v-on:blur="$emit('input-series-issued',$event.target.value)"
+                          :label="$t(seriesIssuedDateLabel ? seriesIssuedDateLabel : 'Issued')"
+                          :hint="'Format YYYY-MM-DD'"
+                          :rules="[validationrules.date]"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+
+                      </v-col>
+
+                    </v-row>
+
+                    <v-row >
+
+                      <v-col cols="4" v-if="!hideSeriesIssn">
+                        <v-text-field
+                          :value="seriesIssn"
+                          :label="$t('ISSN')"
+                          v-on:blur="$emit('input-series-issn',$event.target.value)"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+                      </v-col>
+
+                      <v-col cols="4" v-if="!hideSeriesIdentifier">
+                        <v-text-field
+                          :value="seriesIdentifier"
+                          :label="$t('Identifier')"
+                          v-on:blur="$emit('input-series-identifier',$event.target.value)"
+                          :filled="inputStyle==='filled'"
+                          :outlined="inputStyle==='outlined'"
+                        ></v-text-field>
+                      </v-col>
+
+                    </v-row>
+                  </v-container>
+                </v-card-text>
+              </v-card>
+            </v-col>
+          </v-row>
+        </v-card-text>
+      </v-card>
+    </v-col>
+  </v-row>
+</template>
+
+<script>
+import { fieldproperties } from "../../../mixins/fieldproperties";
+import { vocabulary } from "../../../mixins/vocabulary";
+import { validationrules } from "../../../mixins/validationrules";
+
+export default {
+  name: "p-i-contained-in",
+  mixins: [fieldproperties, vocabulary, validationrules],
+  props: {
+    type: {
+      type: String
+    },
+    multilingual: {
+      type: Boolean
+    },
+    label: {
+      type: String
+    },
+    title: {
+      type: String
+    },
+    subtitle: {
+      type: String
+    },
+    titleLanguage: {
+      type: String
+    },
+    roles: {
+      type: Array
+    },
+    disablerole: {
+      type: Boolean,
+      default: false
+    },
+    showname: {
+      type: Boolean,
+      default: false
+    },
+    showIds: {
+      type: Boolean,
+      default: false
+    },
+    pageStartLabel: {
+      type: String
+    },
+    pageEndLabel: {
+      type: String
+    },
+    pageStart: {
+      type: String
+    },
+    pageEnd: {
+      type: String
+    },
+    seriesLabel: {
+      type: String
+    },
+    seriesTitle: {
+      type: String
+    },
+    seriesTitleLanguage: {
+      type: String
+    },
+    hideSeriesVolume: {
+      type: Boolean
+    },
+    seriesVolume: {
+      type: String
+    },
+    hideSeriesIssue: {
+      type: Boolean
+    },
+    seriesIssue: {
+      type: String
+    },
+    hideSeriesIssued: {
+      type: Boolean
+    },
+    seriesIssued: {
+      type: String
+    },
+    seriesIssuedDateLabel: {
+      type: String
+    },
+    hideSeriesIssn: {
+      type: Boolean
+    },
+    seriesIssn: {
+      type: String
+    },
+    hideSeriesIdentifier: {
+      type: Boolean,
+      default: true
+    },
+    seriesIdentifier: {
+      type: String
+    },
+    collapseSeries: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    roleActions: function() {
+      var arr = [];
+      arr.push({ title: this.$t("Remove"), event: "remove-role" });
+      arr.push({ title: this.$t("Duplicate"), event: "add-role" });
+      arr.push({ title: this.$t("Move up"), event: "up-role" });
+      arr.push({ title: this.$t("Move down"), event: "down-role" });
+      return arr;
+    }
+  },
+  data() {
+    return {
+      collapseSeriesModel: this.collapseSeries
+    };
+  }
+};
+</script>
+
+<style scoped>
+.v-btn {
+  margin: 0;
+}
+.vertical-center {
+  align-items: center;
+}
+</style>
diff --git a/src/components/input/phaidra_inputs/PIDimension.vue b/src/components/input/phaidra_inputs/PIDimension.vue
index 38be8f86b147dffec270519c3466bb80a9e07e91..0f93fe357e79154ba7379b8d767515e54322b987 100644
--- a/src/components/input/phaidra_inputs/PIDimension.vue
+++ b/src/components/input/phaidra_inputs/PIDimension.vue
@@ -45,11 +45,11 @@
 </template>
 
 <script>
-import { vocabulary } from '../../mixins/vocabulary'
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { vocabulary } from "../../../mixins/vocabulary";
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-dimension',
+  name: "p-i-dimension",
   mixins: [vocabulary, fieldproperties],
   props: {
     unit: {
@@ -63,7 +63,7 @@ export default {
       required: true
     }
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIDuration.vue b/src/components/input/phaidra_inputs/PIDuration.vue
index c6d735b70522dd2f7507d58688bfc328f03de2fa..229c28bcbc26a96e3665ea7f62d61e9f6aefe533 100644
--- a/src/components/input/phaidra_inputs/PIDuration.vue
+++ b/src/components/input/phaidra_inputs/PIDuration.vue
@@ -46,10 +46,10 @@
 </template>
 
 <script>
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-duration',
+  name: "p-i-duration",
   mixins: [fieldproperties],
   props: {
     /*
@@ -81,42 +81,44 @@ export default {
     }
   },
   watch: {
-    hours: function (val) {
-      this.$emit('input', this.duration)
+    hours: function(val) {
+      this.$emit("input", this.duration);
     },
-    minutes: function (val) {
-      this.$emit('input', this.duration)
+    minutes: function(val) {
+      this.$emit("input", this.duration);
     },
-    seconds: function (val) {
-      this.$emit('input', this.duration)
+    seconds: function(val) {
+      this.$emit("input", this.duration);
     }
   },
   computed: {
     duration: {
-      get: function () {
-        return 'PT' + this.hours + 'H' + this.minutes + 'M' + this.seconds + 'S'
+      get: function() {
+        return (
+          "PT" + this.hours + "H" + this.minutes + "M" + this.seconds + "S"
+        );
       },
-      set: function (v) {
-        let m = this.value.match(/PT(\d+)H(\d+)M(\d+)S/)
-        if (m){
-          this.hours = m[1]
-          this.minutes = m[2]
-          this.seconds = m[3]
+      set: function(v) {
+        let m = this.value.match(/PT(\d+)H(\d+)M(\d+)S/);
+        if (m) {
+          this.hours = m[1];
+          this.minutes = m[2];
+          this.seconds = m[3];
         }
       }
     }
   },
-  data () {
+  data() {
     return {
       hours: 0,
       minutes: 0,
       seconds: 0
-    }
+    };
   },
-  mounted: function () {
-    this.duration = this.value
+  mounted: function() {
+    this.duration = this.value;
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIEntityExtended.vue b/src/components/input/phaidra_inputs/PIEntityExtended.vue
new file mode 100644
index 0000000000000000000000000000000000000000..c00152297180be1b198bd35005eca7ace319fcce
--- /dev/null
+++ b/src/components/input/phaidra_inputs/PIEntityExtended.vue
@@ -0,0 +1,514 @@
+<template>
+  <v-row>
+    <v-col cols="12">
+      <v-card width="100%">
+        <v-card-title class="title font-weight-light grey white--text">
+          <span>{{ $t(label) }}</span>
+          <v-spacer></v-spacer>
+          <v-btn icon dark @click="$emit('add', $event)">
+            <v-icon>mdi-content-duplicate</v-icon>
+          </v-btn>
+          <v-btn icon dark @click="$emit('add-clear', $event)">
+            <v-icon>mdi-plus</v-icon>
+          </v-btn>
+          <v-btn icon dark @click="$emit('remove', $event)">
+            <v-icon>mdi-minus</v-icon>
+          </v-btn>
+          <v-btn icon dark @click="$emit('up', $event)">
+            <v-icon>mdi-chevron-up</v-icon>
+          </v-btn>
+          <v-btn icon dark @click="$emit('down', $event)">
+            <v-icon>mdi-chevron-down</v-icon>
+          </v-btn>
+        </v-card-title>
+        <v-divider></v-divider>
+        <v-card-text class="mt-4">
+          <v-container>
+            <v-row>
+              <v-col cols="8" v-if="!hideRole">
+                <v-autocomplete
+                  :disabled="disablerole"
+                  v-on:input="$emit('input-role', $event)"
+                  :label="$t('Role')"
+                  :items="vocabularies[roleVocabulary].terms"
+                  :item-value="'@id'"
+                  :value="getTerm(roleVocabulary, role)"
+                  :filter="autocompleteFilter"
+                  :filled="inputStyle==='filled'"
+                  :outlined="inputStyle==='outlined'"
+                  return-object
+                  clearable
+                  :error-messages="roleErrorMessages"
+                >
+                  <template slot="item" slot-scope="{ item }">
+                    <v-list-item-content two-line>
+                      <v-list-item-title  v-html="`${getLocalizedTermLabel(roleVocabulary, item['@id'])}`"></v-list-item-title>
+                      <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                    </v-list-item-content>
+                  </template>
+                  <template slot="selection" slot-scope="{ item }">
+                    <v-list-item-content>
+                      <v-list-item-title v-html="`${getLocalizedTermLabel(roleVocabulary, item['@id'])}`"></v-list-item-title>
+                    </v-list-item-content>
+                  </template>
+                </v-autocomplete>
+              </v-col>
+              <v-col v-if="enableTypeSelect" cols="2">
+                <v-radio-group v-model="typeModel" class="mt-0" @change="$emit('change-type', $event)">
+                  <v-radio color="primary" :label="$t('Personal')" :value="'schema:Person'"></v-radio>
+                  <v-radio color="primary" :label="$t('Corporate')" :value="'schema:Organization'"></v-radio>
+                </v-radio-group>
+              </v-col>
+            </v-row>
+            <template v-if="typeModel === 'schema:Person'">
+              <v-row>
+                <template v-if="showname">
+                  <v-col cols="12" :md="(showIdentifier && !showIdentifierType) ? 8 : 12">
+                    <v-text-field
+                      :value="name"
+                      :label="$t('Name')"
+                      v-on:blur="$emit('input-name',$event.target.value)"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                      :error-messages="nameErrorMessages"
+                    ></v-text-field>
+                  </v-col>
+                </template>
+                <template v-else>
+                  <v-col cols="12" :md="(showIdentifier && !showIdentifierType) ? 4 : 6">
+                    <v-text-field
+                      :value="firstname"
+                      :label="$t('Firstname')"
+                      v-on:blur="$emit('input-firstname',$event.target.value)"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                      :error-messages="firstnameErrorMessages"
+                    ></v-text-field>
+                  </v-col>
+                  <v-col cols="12" :md="(showIdentifier && !showIdentifierType) ? 4 : 6">
+                    <v-text-field
+                      :value="lastname"
+                      :label="$t('Lastname')"
+                      v-on:blur="$emit('input-lastname',$event.target.value)"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                      :error-messages="lastnameErrorMessages"
+                    ></v-text-field>
+                  </v-col>
+                </template>
+                <template v-if="showIdentifier && !showIdentifierType">
+                  <v-col cols="12" md="4">
+                    <v-text-field
+                      v-show="identifierType === 'ids:orcid'"
+                      v-mask="'####-####-####-####'"
+                      :value="identifierText"
+                      :label="identifierLabel ? identifierLabel : $t('Identifier')"
+                      v-on:blur="$emit('input-identifier', $event.target.value)"
+                      :placeholder="identifierTypePlaceholder"
+                      :rules="identifierType ? [validationrules['orcid']] : [validationrules['noop']]"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                    ></v-text-field>
+                    <v-text-field
+                      v-show="identifierType !== 'ids:orcid'"
+                      :value="identifierText"
+                      :label="identifierLabel ? identifierLabel : $t('Identifier')"
+                      v-on:blur="$emit('input-identifier', $event.target.value)"
+                      :placeholder="identifierTypePlaceholder"
+                      :rules="identifierType ? [validationrules[getIdentifierRuleName(identifierType)]] : [validationrules['noop']]"
+                      :filled="inputStyle==='filled'"
+                      :outlined="inputStyle==='outlined'"
+                    ></v-text-field>
+                  </v-col>
+                </template>
+              </v-row>
+              <v-row v-if="showIdentifier && showIdentifierType">
+                <v-col cols="12" md="6">
+                  <v-autocomplete
+                    v-on:input="$emit('input-identifier-type', $event)"
+                    :label="$t('Type of identifier')"
+                    :items="vocabularies[identifierVocabulary].terms"
+                    :item-value="'@id'"
+                    :value="getTerm(identifierVocabulary, identifierType)"
+                    :filter="autocompleteFilter"
+                    :disabled="disableIdentifierType"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                    return-object
+                    clearable
+                  >
+                    <template slot="item" slot-scope="{ item }">
+                      <v-list-item-content two-line>
+                        <v-list-item-title  v-html="`${getLocalizedTermLabel(identifierVocabulary, item['@id'])}`"></v-list-item-title>
+                      </v-list-item-content>
+                    </template>
+                    <template slot="selection" slot-scope="{ item }">
+                      <v-list-item-content>
+                        <v-list-item-title v-html="`${getLocalizedTermLabel(identifierVocabulary, item['@id'])}`"></v-list-item-title>
+                      </v-list-item-content>
+                    </template>
+                  </v-autocomplete>
+                </v-col>
+                <v-col cols="12" md="6" >
+                  <v-text-field
+                    v-show="identifierType === 'ids:orcid'"
+                    v-mask="'####-####-####-####'"
+                    :value="identifierText"
+                    :label="identifierLabel ? identifierLabel : $t('Identifier')"
+                    v-on:blur="$emit('input-identifier', $event.target.value)"
+                    :placeholder="identifierTypePlaceholder"
+                    :rules="identifierType ? [validationrules['orcid']] : [validationrules['noop']]"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                  <v-text-field
+                    v-show="identifierType !== 'ids:orcid'"
+                    :value="identifierText"
+                    :label="identifierLabel ? identifierLabel : $t('Identifier')"
+                    v-on:blur="$emit('input-identifier', $event.target.value)"
+                    :placeholder="identifierTypePlaceholder"
+                    :rules="identifierType ? [validationrules[getIdentifierRuleName(identifierType)]] : [validationrules['noop']]"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                  ></v-text-field>
+                </v-col>
+              </v-row>
+            </template>
+            <template v-if="typeModel === 'schema:Organization'">
+              <v-row>
+                <v-col cols="2">
+                  <v-radio-group v-model="organizationRadio" class="mt-0" @change="$emit('change-organization-type', $event)">
+                    <v-radio color="primary" :label="$t(instanceconfig.institution)" :value="'select'"></v-radio>
+                    <v-radio color="primary" :label="$t('OTHER_FEMININE')" :value="'other'"></v-radio>
+                  </v-radio-group>
+                </v-col>
+                <v-col cols="12" md="10" v-if="organizationRadio === 'select'">
+                  <v-autocomplete
+                    :value="getTerm('orgunits', organization)"
+                    :required="required"
+                    v-on:input="handleInput($event, 'organizationPath', 'input-organization-select')"
+                    :rules="required ? [ v => !!v || 'Required'] : []"
+                    :items="vocabularies['orgunits'].terms"
+                    :item-value="'@id'"
+                    :loading="loading"
+                    :filter="autocompleteFilter"
+                    hide-no-data
+                    :label="$t(organizationSelectLabel)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                    return-object
+                    clearable
+                    :disabled="disabled"
+                    :messages="organizationPath"
+                    :error-messages="organizationErrorMessages"
+                  >
+                    <template slot="item" slot-scope="{ item }">
+                      <v-list-item-content two-line>
+                        <v-list-item-title  v-html="`${getLocalizedTermLabel('orgunits', item['@id'])}`"></v-list-item-title>
+                        <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                      </v-list-item-content>
+                    </template>
+                    <template slot="selection" slot-scope="{ item }">
+                      <v-list-item-content>
+                        <v-list-item-title v-html="`${getLocalizedTermLabel('orgunits', item['@id'])}`"></v-list-item-title>
+                      </v-list-item-content>
+                    </template>
+                    <template v-slot:append-outer>
+                      <v-icon @click="$refs.organizationstreedialog.open()">mdi-file-tree</v-icon>
+                    </template>
+                  </v-autocomplete>
+                </v-col>
+                <v-col cols="12" md="10" v-else>
+                  <v-text-field
+                    :value="organizationText"
+                    :label="$t('Organization')"
+                    v-on:blur="$emit('input-organization-other', $event.target.value)"
+                    :filled="inputStyle==='filled'"
+                    :outlined="inputStyle==='outlined'"
+                    :error-messages="organizationTextErrorMessages"
+                  ></v-text-field>
+                </v-col>
+              </v-row>
+            </template>
+            <v-row v-if="typeModel === 'schema:Person'">
+              <v-col cols="2">
+                <v-radio-group v-model="affiliationRadio" class="mt-0" @change="$emit('change-affiliation-type', $event)">
+                  <v-radio color="primary" :label="$t(instanceconfig.institution)" :value="'select'"></v-radio>
+                  <v-radio color="primary" :label="$t('OTHER_FEMININE')" :value="'other'"></v-radio>
+                </v-radio-group>
+              </v-col>
+              <v-col cols="12" md="10" v-if="affiliationRadio === 'select'">
+                <v-autocomplete
+                  :value="getTerm('orgunits', affiliation)"
+                  :required="required"
+                  v-on:input="handleInput($event, 'affiliationPath', 'input-affiliation-select')"
+                  :rules="required ? [ v => !!v || 'Required'] : []"
+                  :items="vocabularies['orgunits'].terms"
+                  :item-value="'@id'"
+                  :loading="loading"
+                  :filter="autocompleteFilter"
+                  hide-no-data
+                  :label="$t(affiliationSelectLabel)"
+                  :filled="inputStyle==='filled'"
+                  :outlined="inputStyle==='outlined'"
+                  return-object
+                  clearable
+                  :disabled="disabled"
+                  :messages="affiliationPath"
+                  :error-messages="affiliationErrorMessages"
+                >
+                  <template slot="item" slot-scope="{ item }">
+                    <v-list-item-content two-line>
+                      <v-list-item-title  v-html="`${getLocalizedTermLabel('orgunits', item['@id'])}`"></v-list-item-title>
+                      <v-list-item-subtitle v-if="showIds" v-html="`${item['@id']}`"></v-list-item-subtitle>
+                    </v-list-item-content>
+                  </template>
+                  <template slot="selection" slot-scope="{ item }">
+                    <v-list-item-content>
+                      <v-list-item-title v-html="`${getLocalizedTermLabel('orgunits', item['@id'])}`"></v-list-item-title>
+                    </v-list-item-content>
+                  </template>
+                  <template v-slot:append-outer>
+                    <v-icon @click="$refs.affiliationstreedialog.open()">mdi-file-tree</v-icon>
+                  </template>
+                </v-autocomplete>
+              </v-col>
+              <v-col cols="12" md="10" v-else>
+                <v-text-field
+                  :value="affiliationText"
+                  :label="$t('Affiliation')"
+                  v-on:blur="$emit('input-affiliation-other',$event.target.value)"
+                  :filled="inputStyle==='filled'"
+                  :outlined="inputStyle==='outlined'"
+                  :error-messages="affiliationTextErrorMessages"
+                ></v-text-field>
+              </v-col>
+            </v-row>
+          </v-container>
+        </v-card-text>
+      </v-card>
+    </v-col>
+    <org-units-tree-dialog ref="organizationstreedialog" @unit-selected="handleInput(getTerm('orgunits', $event), 'organizationPath', 'input-organization-select')"></org-units-tree-dialog>
+    <org-units-tree-dialog ref="affiliationstreedialog" @unit-selected="handleInput(getTerm('orgunits', $event), 'affiliationPath', 'input-affiliation-select')"></org-units-tree-dialog>
+  </v-row>
+</template>
+
+<script>
+import { mask } from "vue-the-mask";
+import { vocabulary } from "../../../mixins/vocabulary";
+import { fieldproperties } from "../../../mixins/fieldproperties";
+import { validationrules } from "../../../mixins/validationrules";
+import OrgUnitsTreeDialog from "../../select/OrgUnitsTreeDialog";
+
+export default {
+  name: "p-i-entity-extended",
+  mixins: [vocabulary, fieldproperties, validationrules],
+  components: {
+    OrgUnitsTreeDialog
+  },
+  directives: {
+    mask
+  },
+  props: {
+    label: {
+      type: String
+    },
+    firstname: {
+      type: String
+    },
+    lastname: {
+      type: String
+    },
+    name: {
+      type: String
+    },
+    affiliation: {
+      type: String
+    },
+    affiliationText: {
+      type: String
+    },
+    affiliationType: {
+      type: String
+    },
+    organization: {
+      type: String
+    },
+    organizationText: {
+      type: String
+    },
+    organizationType: {
+      type: String
+    },
+    identifierText: {
+      type: String
+    },
+    identifierType: {
+      type: String
+    },
+    identifierLabel: {
+      type: String
+    },
+    showIdentifier: {
+      type: Boolean
+    },
+    showIdentifierType: {
+      type: Boolean
+    },
+    disableIdentifierType: {
+      type: Boolean
+    },
+    role: {
+      type: String
+    },
+    hideRole: {
+      type: Boolean
+    },
+    type: {
+      type: String
+    },
+    required: {
+      type: Boolean
+    },
+    disablerole: {
+      type: Boolean,
+      default: false
+    },
+    nameErrorMessages: {
+      type: Array
+    },
+    firstnameErrorMessages: {
+      type: Array
+    },
+    lastnameErrorMessages: {
+      type: Array
+    },
+    roleErrorMessages: {
+      type: Array
+    },
+    affiliationErrorMessages: {
+      type: Array
+    },
+    affiliationTextErrorMessages: {
+      type: Array
+    },
+    organizationErrorMessages: {
+      type: Array
+    },
+    organizationTextErrorMessages: {
+      type: Array
+    },
+    showname: {
+      type: Boolean,
+      default: false
+    },
+    roleVocabulary: {
+      type: String,
+      default: "rolepredicate"
+    },
+    identifierVocabulary: {
+      type: String,
+      default: "entityidentifiertype"
+    },
+    showIds: {
+      type: Boolean,
+      default: false
+    },
+    enableTypeSelect: {
+      type: Boolean,
+      default: true
+    },
+    organizationSelectLabel: {
+      type: String,
+      default: "Please choose"
+    },
+    affiliationSelectLabel: {
+      type: String,
+      default: "Please choose"
+    }
+  },
+  computed: {
+    instanceconfig: function() {
+      return this.$root.$store.state.instanceconfig;
+    },
+    appconfig: function() {
+      return this.$root.$store.state.appconfig;
+    },
+    identifierTypePlaceholder: function() {
+      for (let i of this.vocabularies[this.identifierVocabulary].terms) {
+        if (i["@id"] === this.identifierType) {
+          return i["skos:example"];
+        }
+      }
+      return "";
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      disabled: false,
+      typeModel: this.type,
+      affiliationRadio: this.affiliationType,
+      organizationRadio: this.organizationType,
+      affiliationPath: "",
+      organizationPath: ""
+    };
+  },
+  methods: {
+    getParentPath: function(unit, parentpath) {
+      if (unit) {
+        if (unit["parent"]) {
+          parentpath.push(unit.parent);
+          this.getParentPath(unit.parent, parentpath);
+        }
+      }
+    },
+    handleInput: function(unit, propName, eventName) {
+      this[propName] = "";
+      let parentpath = [];
+      if (unit) {
+        this.getParentPath(unit, parentpath);
+        for (let u of parentpath.reverse()) {
+          this[propName] =
+            this[propName] + u["skos:prefLabel"][this.$i18n.locale] + " > ";
+        }
+        this[propName] =
+          this[propName] + unit["skos:prefLabel"][this.$i18n.locale];
+      }
+      this.$emit(eventName, unit);
+    }
+  },
+  mounted: function() {
+    this.$nextTick(function() {
+      if (!this.vocabularies["orgunits"].loaded) {
+        this.$store.dispatch("loadOrgUnits", this.$i18n.locale);
+      }
+      this.loading = !this.vocabularies[this.roleVocabulary].loaded;
+      // emit input to set skos:prefLabel in parent
+      if (this.role) {
+        this.$emit("input", this.getTerm(this.roleVocabulary, this.role));
+      }
+      if (this.organization) {
+        this.handleInput(
+          this.getTerm("orgunits", this.organization),
+          "organizationPath",
+          "input-organization-select"
+        );
+      }
+      if (this.affiliation) {
+        this.handleInput(
+          this.getTerm("orgunits", this.affiliation),
+          "affiliationPath",
+          "input-affiliation-select"
+        );
+      }
+    });
+  }
+};
+</script>
+
+<style scoped>
+.v-btn {
+  margin: 0;
+}
+</style>
diff --git a/src/components/input/phaidra_inputs/PIFile.vue b/src/components/input/phaidra_inputs/PIFile.vue
index 8a2940ec7d136e80a834b60a0ea3ac3c971ef31e..6cd417e248455bf739663ba0a9f9facd7b3c3c69 100644
--- a/src/components/input/phaidra_inputs/PIFile.vue
+++ b/src/components/input/phaidra_inputs/PIFile.vue
@@ -29,7 +29,7 @@
 </template>
 
 <script>
-import { fieldproperties } from "../../mixins/fieldproperties";
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
   name: "p-i-file",
diff --git a/src/components/input/phaidra_inputs/PIFilename.vue b/src/components/input/phaidra_inputs/PIFilename.vue
new file mode 100644
index 0000000000000000000000000000000000000000..421aba3c143c86a6bf6f1b8e6e8e534d88ae9c5f
--- /dev/null
+++ b/src/components/input/phaidra_inputs/PIFilename.vue
@@ -0,0 +1,30 @@
+<template>
+  <v-row >
+    <v-col cols="8">
+      <v-text-field
+        :value="value"
+        :label="$t('Filename')"
+        v-on:blur="$emit('input-value',$event.target.value)"
+        :filled="inputStyle==='filled'"
+        :outlined="inputStyle==='outlined'"
+      ></v-text-field>
+    </v-col>
+  </v-row>
+</template>
+<script>
+import { fieldproperties } from "../../../mixins/fieldproperties";
+
+export default {
+  name: "p-i-filename",
+  mixins: [fieldproperties],
+  props: {
+    value: {
+      type: String
+    },
+    label: {
+      type: String,
+      required: true
+    }
+  }
+};
+</script>
diff --git a/src/components/input/phaidra_inputs/PIForm.vue b/src/components/input/phaidra_inputs/PIForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0c598bef214b38bc1a3f31b0cef328a34ff64896
--- /dev/null
+++ b/src/components/input/phaidra_inputs/PIForm.vue
@@ -0,0 +1,1128 @@
+<template>
+  <v-container fluid v-if="form && form.sections">
+    <v-tabs v-model="activetab" align-with-title>
+      <v-tab class="title font-weight-light text-capitalize">{{ $t('Metadata') }}<template v-if="targetpid">&nbsp;-&nbsp;<span class="text-lowercase">{{ targetpid }}</span></template></v-tab>
+      <v-tab @click="metadatapreview = getMetadata()" class="title font-weight-light text-capitalize">{{ $t('JSON-LD') }}</v-tab>
+      <v-tab v-if="templating" @click="loadTemplates()" class="title font-weight-light text-capitalize">{{ $t('Templates') }}</v-tab>
+    </v-tabs>
+
+    <v-tabs-items v-model="activetab">
+      <v-tab-item class="pa-3" v-if="form">
+
+        <v-row v-for="(s) in this.form.sections" :key="s.id" class="ma-3">
+
+          <v-card v-if="s.type === 'resourcelink'" width="100%">
+            <v-card-title class="title font-weight-light grey white--text">
+              <span>{{s.title}}</span>
+              <v-spacer></v-spacer>
+            </v-card-title>
+            <v-card-text class="mt-4">
+              <v-text-field v-model="s.resourcelink"
+                :label="$t('Resource link')"
+                :required="true"
+                :placeholder="$t('e.g.: https://phaidra.org')"
+                :rules="[ v => !!v || 'Required']"
+                filled
+              ></v-text-field>
+            </v-card-text>
+          </v-card>
+
+          <v-card v-else-if="(s.type !== 'accessrights')" width="100%">
+            <v-card-title class="title font-weight-light grey white--text">
+              <span v-t="s.title"></span>
+              <v-spacer></v-spacer>
+              <v-checkbox dark color="white" v-if="s.type === 'member'" v-model="previewMember" :label="$t('Container thumbnail')" :value="s.id"></v-checkbox>
+              <v-spacer></v-spacer>
+              <v-menu open-on-hover bottom offset-y v-if="!s.disablemenu">
+                <template v-slot:activator="{ on }">
+                  <v-btn v-on="on" icon dark>
+                    <v-icon dark>mdi-dots-vertical</v-icon>
+                  </v-btn>
+                </template>
+                <v-list>
+                  <v-list-item v-if="s.multiplicable && (s.type === 'member') || (s.type === 'phaidra:Subject')" @click="addSection(s)">
+                    <v-list-item-title><span v-t="'Duplicate'"></span></v-list-item-title>
+                  </v-list-item>
+                  <v-list-item v-if="s.removable && (s.type != 'digitalobject')" @click="removeSection(s)">
+                    <v-list-item-title><span v-t="'Remove'"></span></v-list-item-title>
+                  </v-list-item>
+                  <v-list-item v-if="s.type === 'member'" @click="sortMemberUp(s)">
+                    <v-list-item-title><span v-t="'Move up'"></span></v-list-item-title>
+                  </v-list-item>
+                  <v-list-item v-if="s.type === 'member'" @click="sortMemberDown(s)">
+                    <v-list-item-title><span v-t="'Move down'"></span></v-list-item-title>
+                  </v-list-item>
+                  <v-list-item v-if="s.type === 'digitalobject'" @click="$emit('add-phaidrasubject-section', s)">
+                    <v-list-item-title><span v-t="'Add subject metadata section'"></span></v-list-item-title>
+                  </v-list-item>
+                </v-list>
+              </v-menu>
+            </v-card-title>
+            <v-card-text class="mt-4">
+
+              <template v-for="(f) in s.fields">
+             
+                <v-row no-gutters :key="f.id">
+
+                  <template v-if="f.component === 'p-text-field'">
+                    <p-i-text-field
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-text-field>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-text-field-suggest'">
+                    <p-i-text-field-suggest
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-text-field-suggest>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-keyword'">
+                    <p-i-keyword
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-keyword>
+                  </template>
+
+                  <template v-if="f.component === 'p-title'">
+                    <p-i-title
+                      v-bind.sync="f"
+                      v-on:input-title="f.title=$event"
+                      v-on:input-subtitle="f.subtitle=$event"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                      v-on:up="sortFieldUp(s.fields, f)"
+                      v-on:down="sortFieldDown(s.fields, f)"
+                    ></p-i-title>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-select'">
+                    <p-i-select
+                      v-bind.sync="f"
+                      v-on:input="selectInput(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-select>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-select-text'">
+                    <p-i-select-text
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-select="f.selectvalue=$event"
+                      v-on:input-text="f.textvalue=$event"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-select-text>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-date-edtf'">
+                    <p-i-date-edtf
+                      v-bind.sync="f"
+                      v-on:input-date="f.value=$event"
+                      v-on:input-date-type="setSelected(f, 'type', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-date-edtf>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-duration'">
+                    <p-i-duration
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-duration>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-series'">
+                    <p-i-series
+                      v-bind.sync="f"
+                      v-on:input-select-journal="selectJournal(f, $event)"
+                      v-on:input-title="f.title=$event"
+                      v-on:input-title-language="setSelected(f, 'titleLanguage', $event)"
+                      v-on:input-volume="f.volume=$event"
+                      v-on:input-issue="f.issue=$event"
+                      v-on:input-issued="f.issued=$event"
+                      v-on:input-issn="f.issn=$event"
+                      v-on:input-identifier="f.identifier=$event"
+                      v-on:input-page-start="f.pageStart=$event"
+                      v-on:input-page-end="f.pageEnd=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-series>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-citation'">
+                    <p-i-citation
+                      v-bind.sync="f"
+                      v-on:input-citation-type="setSelected(f, 'type', $event)"
+                      v-on:input-citation="f.citation=$event"
+                      v-on:input-citation-language="setSelected(f, 'citationLanguage', $event)"
+                      v-on:input-identifier="f.identifier=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-citation>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-bf-publication'">
+                    <p-i-bf-publication
+                      v-bind.sync="f"
+                      v-on:input-suggest-publisher="publisherSuggestInput(f, $event)"
+                      v-on:input-publisher-name="f.publisherName=$event"
+                      v-on:change-type="f.publisherType = $event"
+                      v-on:input-publisher-select="publisherSelectInput(f, $event)"
+                      v-on:input-publishing-place="f.publishingPlace=$event"
+                      v-on:input-publishing-date="f.publishingDate=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-bf-publication>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-adaptation'">
+                    <p-i-adaptation
+                      v-bind.sync="f"
+                      v-on:input-title="f.title=$event"
+                      v-on:input-subtitle="f.subtitle=$event"
+                      v-on:input-title-language="setSelected(f, 'titleLanguage', $event)"
+                      v-on:input-firstname="f.firstname=$event"
+                      v-on:input-lastname="f.lastname=$event"
+                      v-on:input-name="f.name=$event"
+                      v-on:input-role="roleInput(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-adaptation>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-contained-in'">
+                    <p-i-contained-in
+                      v-bind.sync="f"
+                      v-on:input-title="f.title=$event"
+                      v-on:input-subtitle="f.subtitle=$event"
+                      v-on:input-title-language="setSelected(f, 'titleLanguage', $event)"
+                      v-on:input-role="containedInRoleInput(f, $event)"
+                      v-on:input-series-title="f.seriesTitle=$event"
+                      v-on:input-series-title-language="setSelected(f, 'seriesTitleLanguage', $event)"
+                      v-on:input-series-volume="f.seriesVolume=$event"
+                      v-on:input-series-issue="f.seriesIssue=$event"
+                      v-on:input-series-issued="f.seriesIssued=$event"
+                      v-on:input-series-issn="f.seriesIssn=$event"
+                      v-on:input-series-identifier="f.seriesIdentifier=$event"
+                      v-on:add-role="addContainedInRole(f.roles, $event)"
+                      v-on:remove-role="removeContainedInRole(f.roles, $event)"
+                      v-on:up-role="sortContainedInRoleUp(f.roles, $event)"
+                      v-on:down-role="sortContainedInRoleDown(f.roles, $event)"
+                    ></p-i-contained-in>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-entity'">
+                    <p-i-entity
+                      v-bind.sync="f"
+                      v-on:input-firstname="f.firstname=$event"
+                      v-on:input-lastname="f.lastname=$event"
+                      v-on:input-name="f.name=$event"
+                      v-on:input-organization="f.organization=$event"
+                      v-on:input-role="roleInput(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                      v-on:up="sortFieldUp(s.fields, f)"
+                      v-on:down="sortFieldDown(s.fields, f)"
+                    ></p-i-entity>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-entity-extended'">
+                    <p-i-entity-extended
+                      v-bind.sync="f"
+                      v-on:change-type="f.type = $event"
+                      v-on:input-firstname="f.firstname = $event"
+                      v-on:input-lastname="f.lastname = $event"
+                      v-on:input-name="f.name = $event"
+                      v-on:input-identifier-type="setSelected(f, 'identifierType', $event)"
+                      v-on:input-identifier="f.identifierText = $event"
+                      v-on:change-affiliation-type="f.affiliationType = $event"
+                      v-on:input-affiliation-select="affiliationSelectInput(f, $event)"
+                      v-on:input-affiliation-other="f.affiliationText = $event"
+                      v-on:change-organization-type="f.organizationType = $event"
+                      v-on:input-organization-select="organizationSelectInput(f, $event)"
+                      v-on:input-organization-other="f.organizationText = $event"
+                      v-on:input-role="roleInput(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:add-clear="addEntityClear(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                      v-on:up="sortFieldUp(s.fields, f)"
+                      v-on:down="sortFieldDown(s.fields, f)"
+                    ></p-i-entity-extended>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-subject-gnd'">
+                    <p-i-subject-gnd
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:resolve="updateSubject(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-subject-gnd>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-spatial-getty'">
+                    <p-i-spatial-getty
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-place-type="setSelected(f, 'type', $event)"
+                      v-on:resolve="updatePlace(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-spatial-getty>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-spatial-text'">
+                    <p-i-spatial-text
+                      v-bind.sync="f"
+                      v-on:input="f.value=$event"
+                      v-on:input-place-type="setSelected(f, 'type', $event)"
+                      v-on:input-language="setSelected(f, 'language', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-spatial-text>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-dimension'">
+                    <p-i-dimension
+                      v-bind.sync="f"
+                      v-on:input-value="f.value=$event"
+                      v-on:input-unit="setSelected(f, 'unitCode', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-dimension>
+                  </template>
+
+                  <template v-else-if="(f.component === 'p-literal') && (f.predicate !== 'schema:pageStart') && (f.predicate !== 'schema:pageEnd')">
+                    <p-i-literal
+                      v-bind.sync="f"
+                      v-on:input-value="f.value=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-literal>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-alternate-identifier'">
+                    <p-i-alternate-identifier
+                      v-bind.sync="f"
+                      v-on:input-identifier="f.value=$event"
+                      v-on:input-identifier-type="setSelected(f, 'identifierType', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                      class="my-2"
+                    ></p-i-alternate-identifier>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-study-plan'">
+                    <p-i-study-plan
+                      v-bind.sync="f"
+                      v-on:input-name="f.name=$event"
+                      v-on:input-name-language="setSelected(f, 'nameLanguage', $event)"
+                      v-on:input-notation="f.notation=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-study-plan>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-project'">
+                    <p-i-project
+                      v-bind.sync="f"
+                      v-on:input-name="f.name=$event"
+                      v-on:input-name-language="setSelected(f, 'nameLanguage', $event)"
+                      v-on:input-funder-name="f.funderName=$event"
+                      v-on:input-funder-name-language="setSelected(f, 'funderNameLanguage', $event)"
+                      v-on:input-description="f.description=$event"
+                      v-on:input-description-language="setSelected(f, 'descriptionLanguage', $event)"
+                      v-on:input-identifier="f.identifier=$event"
+                      v-on:input-funder-identifier="f.funderIdentifier=$event"
+                      v-on:input-homepage="f.homepage=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-project>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-funder'">
+                    <p-i-funder
+                      v-bind.sync="f"
+                      v-on:input-name="f.name=$event"
+                      v-on:input-name-language="setSelected(f, 'nameLanguage', $event)"
+                      v-on:input-identifier="f.identifier=$event"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-funder>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-association'">
+                    <p-i-association
+                      v-bind.sync="f"
+                      v-on:input="selectInput(f, $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-association>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-filename'">
+                    <p-i-filename
+                      v-bind.sync="f"
+                      v-on:input-value="f.value=$event"
+                    ></p-i-filename>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-filename-readonly'">
+                    <p-i-filename-readonly v-bind.sync="f"></p-i-filename-readonly>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-unknown-readonly'">
+                    <p-i-unknown-readonly v-bind.sync="f"></p-i-unknown-readonly>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-vocab-ext-readonly'">
+                    <p-i-vocab-ext-readonly
+                      v-bind.sync="f"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-vocab-ext-readonly>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-spatial-getty-readonly'">
+                    <p-i-spatial-getty-readonly
+                      v-bind.sync="f"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-spatial-getty-readonly>
+                  </template>
+
+                  <template v-else-if="f.component === 'p-file'">
+                    <p-i-file
+                      v-bind.sync="f"
+                      v-on:input-file="setFilename(f, $event)"
+                      v-on:input-mimetype="setSelected(f, 'mimetype', $event)"
+                      v-on:add="addField(s.fields, f)"
+                      v-on:remove="removeField(s.fields, f)"
+                    ></p-i-file>
+                  </template>
+
+                </v-row>
+              </template>
+
+              <v-row>
+                <v-col>
+                  <v-dialog v-if="addbutton" class="pb-4" v-model="s['adddialogue']" scrollable width="700px">
+                    <template v-slot:activator="{ on }">
+                      <v-btn v-on="on" fab depressed small color="grey lighten-3">
+                        <v-icon color="grey darken-1">mdi-plus</v-icon>
+                      </v-btn>
+                    </template>
+                    <v-card>
+                      <v-card-title class="grey white--text"><span v-t="'Add metadata fields'"></span></v-card-title>
+                      <v-card-text>
+                        <v-list three-line >
+                          <v-text-field clearable label="Search..." append-icon="mdi-magnify" v-model="searchfieldsinput"></v-text-field>
+                          <template v-for="field in filteredMetadatafields">
+                            <v-list-item :key="field.id" @click="addfieldselection.push(field)">
+                              <v-list-item-content>
+                                <v-list-item-title>{{field.fieldname}}</v-list-item-title>
+                                <v-list-item-subtitle>{{field.definition}}</v-list-item-subtitle>
+                              </v-list-item-content>
+                            </v-list-item>
+                            <v-divider :key="'divi'+field.id"></v-divider>
+                          </template>
+                        </v-list>
+                      </v-card-text>
+                      <v-divider :key="'divi'+s.id"></v-divider>
+                      <v-card-actions>
+                        <v-container>
+                          <v-row>
+                            <v-col v-if="addfieldselection.length > 0">
+                              <span v-t="'Selected fields:'" class="mr-2"></span> <v-chip :key="index" v-for="(ch, index) in addfieldselection" close @click:close="removeField(addfieldselection, ch)">{{ ch.fieldname }}</v-chip>
+                            </v-col>
+                            <v-col v-else><span v-t="'Please select metadata fields from the list'"></span></v-col>
+                          </v-row>
+                          <v-row justify="end">
+                            <v-btn color="grey" dark @click="addfieldselection = []; s['adddialogue'] = false"><span v-t="'Cancel'"></span></v-btn>
+                            <v-btn color="primary" @click="addFields(s)"><span v-t="'Add'"></span></v-btn>
+                          </v-row>
+                        </v-container>
+                      </v-card-actions>
+                    </v-card>
+
+                  </v-dialog>
+                </v-col>
+              </v-row>
+            </v-card-text>
+
+          </v-card>
+        </v-row>
+
+        <v-row align="center" justify="end"  class="ma-3">
+          <v-dialog v-if="templating" v-model="templatedialog" width="500">
+            <template v-slot:activator="{ on }">
+              <v-btn class="mr-3" v-on="on" dark raised :loading="loading" :disabled="loading" color="grey"><span v-t="'Save as template'"></span></v-btn>
+            </template>
+            <v-card>
+              <v-card-title class="title font-weight-light grey lighten-2" primary-title><span v-t="'Save as template'"></span></v-card-title>
+              <v-card-text>
+                <v-text-field class="mt-4" hide-details filled single-line v-model="templatename" :label="$t('Template name')" ></v-text-field>
+              </v-card-text>
+              <v-card-actions>
+                <v-spacer></v-spacer>
+                <v-btn :loading="loading" :disabled="loading" color="grey" dark @click="templatedialog= false"><span v-t="'Cancel'"></span></v-btn>
+                <v-btn :loading="loading" :disabled="loading" color="primary" @click="saveAsTemplate()"><span v-t="'Save'"></span></v-btn>
+              </v-card-actions>
+            </v-card>
+          </v-dialog>
+          <v-btn fixed bottom right v-if="targetpid && floatingsavebutton" raised :loading="loading" :disabled="loading" color="primary" @click="save()"><span v-t="'Save'"></span></v-btn>
+          <v-btn v-else-if="targetpid && !floatingsavebutton" raised :loading="loading" :disabled="loading" color="primary" @click="save()"><span v-t="'Save'"></span></v-btn>
+          <v-btn v-else raised :loading="loading" :disabled="loading" color="primary" @click="submit()"><span v-t="'Submit'"></span></v-btn>
+        </v-row>
+
+      </v-tab-item>
+      <v-tab-item class="pa-3">
+        <code>{{ metadatapreview }}</code>
+      </v-tab-item>
+      <v-tab-item class="ma-4">
+        <p-templates ref="templates" v-on:load-template="loadTemplate($event)"></p-templates>
+      </v-tab-item>
+    </v-tabs-items>
+
+  </v-container>
+
+</template>
+
+<script>
+import arrays from "../../../utils/arrays";
+import jsonLd from "../../../utils/json-ld";
+import fields from "../../../utils/fields";
+import PITextField from "./PITextField";
+import PITextFieldSuggest from "./PITextFieldSuggest";
+import PITitle from "./PITitle";
+import PIEntity from "./PIEntity";
+import PIEntityExtended from "./PIEntityExtended";
+import PIDateEdtf from "./PIDateEdtf";
+import PISelect from "./PISelect";
+import PISelectText from "./PISelectText";
+import PISubjectGnd from "./PISubjectGnd";
+import PISpatialGetty from "./PISpatialGetty";
+import PISpatialText from "./PISpatialText";
+import PIDimension from "./PIDimension";
+import PIDuration from "./PIDuration";
+import PIProject from "./PIProject";
+import PIFunder from "./PIFunder";
+import PIAssociation from "./PIAssociation";
+import PISeries from "./PISeries";
+import PIContainedIn from "./PIContainedIn";
+import PICitation from "./PICitation";
+import PIBfPublication from "./PIBfPublication";
+import PIAdaptation from "./PIAdaptation";
+import PIFilenameReadonly from "./PIFilenameReadonly";
+import PIFilename from "./PIFilename";
+import PIFile from "./PIFile";
+import PISpatialGettyReadonly from "./PISpatialGettyReadonly";
+import PIVocabExtReadonly from "./PIVocabExtReadonly";
+import PIUnknownReadonly from "./PIUnknownReadonly";
+import PILiteral from "./PILiteral";
+import PIStudyPlan from "./PIStudyPlan";
+import PIKeyword from "./PIKeyword";
+import PTemplates from "../../templates/PTemplates";
+export default {
+  name: "p-i-form",
+  components: {
+    PITextField,
+    PITextFieldSuggest,
+    PITitle,
+    PIEntity,
+    PIEntityExtended,
+    PIDateEdtf,
+    PISelect,
+    PISelectText,
+    PISubjectGnd,
+    PISpatialGetty,
+    PISpatialText,
+    PIDimension,
+    PIDuration,
+    PIStudyPlan,
+    PIProject,
+    PIFunder,
+    PIAssociation,
+    PISeries,
+    PIContainedIn,
+    PICitation,
+    PIBfPublication,
+    PIAdaptation,
+    PILiteral,
+    PIKeyword,
+    PIFilenameReadonly,
+    PIFilename,
+    PIFile,
+    PIVocabExtReadonly,
+    PISpatialGettyReadonly,
+    PIUnknownReadonly,
+    PTemplates
+  },
+  props: {
+    form: {
+      type: Object
+    },
+    targetpid: {
+      type: String
+    },
+    owner: {
+      // if defined, phaidra will transfer ownership to this user
+      // IIF the current user is authorized to do so in phaidra-api
+      type: String
+    },
+    addbutton: {
+      type: Boolean,
+      default: true
+    },
+    templating: {
+      type: Boolean,
+      default: true
+    },
+    floatingsavebutton: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    submittype: function() {
+      for (let s of this.form.sections) {
+        if (s.fields && s.type !== "member") {
+          for (let field of s.fields) {
+            if (field.predicate === "dcterms:type") {
+              return this.getObjectType(field.value);
+            }
+          }
+        }
+      }
+      return null;
+    },
+    filteredMetadatafields() {
+      let list = fields.getEditableFields();
+      if (this.searchfieldsinput) {
+        return list.filter(
+          f =>
+            f.fieldname
+              .toLowerCase()
+              .includes(this.searchfieldsinput.toLowerCase()) ||
+            f.definition
+              .toLowerCase()
+              .includes(this.searchfieldsinput.toLowerCase())
+        );
+      } else {
+        return list;
+      }
+    }
+  },
+  data() {
+    return {
+      activetab: null,
+      loadedMetadata: [],
+      loading: false,
+      fab: false,
+      addfieldselection: [],
+      templatedialog: "",
+      templatename: "",
+      previewMember: "",
+      searchfieldsinput: "",
+      metadatapreview: {}
+    };
+  },
+  methods: {
+    getMetadata: function() {
+      let jsonlds;
+      if (!this.targetpid && this.submittype === "container") {
+        jsonlds = jsonLd.containerForm2json(this.form);
+      } else {
+        jsonlds = jsonLd.form2json(this.form);
+      }
+      let md = { metadata: { "json-ld": jsonlds } };
+      let colorder = [];
+      let i = 0;
+      for (let s of this.form.sections) {
+        if (s.type === "member") {
+          i++;
+          colorder.push({ member: "member_" + s.id, pos: i });
+        }
+        if (s.type === "accessrights") {
+          md["metadata"]["rights"] = s.rights;
+        }
+        if (s.type === "resourcelink") {
+          md["metadata"]["resourcelink"] = s.resourcelink;
+        }
+      }
+      if (colorder.length > 0) {
+        md["metadata"]["membersorder"] = colorder;
+      }
+      if (this.previewMember) {
+        md["metadata"]["relationships"] = [
+          {
+            s: "member_" + this.previewMember,
+            p: "http://phaidra.org/XML/V1.0/relations#isThumbnailFor",
+            o: "container"
+          }
+        ];
+      }
+      if (this.owner) {
+        md["metadata"]["ownerid"] = this.owner;
+      }
+      return md;
+    },
+    loadTemplates: function() {
+      if (this.$refs.templates) {
+        this.$refs.templates.loadTemplates();
+      }
+    },
+    loadTemplate: function(form) {
+      this.$emit("load-form", form);
+      this.activetab = 0;
+    },
+    saveAsTemplate: async function() {
+      var httpFormData = new FormData();
+      this.loading = true;
+      httpFormData.append("name", this.templatename);
+      httpFormData.append("form", JSON.stringify(this.form));
+      try {
+        let response = await this.$http.request({
+          method: "POST",
+          url: this.$store.state.instanceconfig.api + "/jsonld/template/add",
+          headers: {
+            "Content-Type": "multipart/form-data",
+            "X-XSRF-TOKEN": this.$store.state.user.token
+          },
+          data: httpFormData
+        });
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit("setAlerts", response.data.alerts);
+        }
+      } catch (error) {
+        console.log(error);
+        this.$store.commit("setAlerts", [{ type: "danger", msg: error }]);
+      } finally {
+        this.loading = false;
+        this.templatedialog = false;
+      }
+    },
+    getObjectType: function(contentmodel) {
+      switch (contentmodel) {
+        case "https://pid.phaidra.org/vocabulary/44TN-P1S0":
+          return "picture";
+        case "https://pid.phaidra.org/vocabulary/8YB5-1M0J":
+          return "audio";
+        case "https://pid.phaidra.org/vocabulary/B0Y6-GYT8":
+          return "video";
+        case "https://pid.phaidra.org/vocabulary/69ZZ-2KGX":
+          return "document";
+        case "https://pid.phaidra.org/vocabulary/8MY0-BQDQ":
+          return "container";
+        case "https://pid.phaidra.org/vocabulary/T8GH-F4V8":
+          return "resource";
+        case "https://pid.phaidra.org/vocabulary/GXS7-ENXJ":
+          return "collection";
+        default:
+          return "unknown";
+      }
+    },
+    submit: async function() {
+      this.loading = true;
+      var httpFormData = new FormData();
+      switch (this.submittype) {
+        case "container":
+          for (var i = 0; i < this.form.sections.length; i++) {
+            var s = this.form.sections[i];
+            if (s.type === "member") {
+              for (var j = 0; j < s.fields.length; j++) {
+                if (s.fields[j].component === "p-file") {
+                  if (s.fields[j].file !== "") {
+                    httpFormData.append("member_" + s.id, s.fields[j].file);
+                  }
+                }
+              }
+            }
+          }
+          break;
+        default:
+          for (i = 0; i < this.form.sections.length; i++) {
+            s = this.form.sections[i];
+            if (s.fields) {
+              for (j = 0; j < s.fields.length; j++) {
+                if (s.fields[j].component === "p-file") {
+                  if (s.fields[j].file !== "") {
+                    httpFormData.append("file", s.fields[j].file);
+                  }
+                }
+              }
+            }
+          }
+          break;
+      }
+      httpFormData.append("metadata", JSON.stringify(this.getMetadata()));
+      try {
+        let response = await this.$http.request({
+          method: "POST",
+          url:
+            this.$store.state.instanceconfig.api +
+            "/" +
+            this.submittype +
+            "/create",
+          headers: {
+            "Content-Type": "multipart/form-data",
+            "X-XSRF-TOKEN": this.$store.state.user.token
+          },
+          data: httpFormData
+        });
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit("setAlerts", response.data.alerts);
+        }
+        if (response.data.status === 200) {
+          if (response.data.pid) {
+            this.$emit("object-created", response.data.pid);
+          }
+        }
+      } catch (error) {
+        console.log(error);
+        this.$store.commit("setAlerts", [{ type: "danger", msg: error }]);
+      } finally {
+        this.$vuetify.goTo(0);
+        this.loading = false;
+      }
+    },
+    save: async function() {
+      this.loading = true;
+      var httpFormData = new FormData();
+      httpFormData.append("metadata", JSON.stringify(this.getMetadata()));
+      try {
+        let response = await this.$http.request({
+          method: "POST",
+          url:
+            this.$store.state.instanceconfig.api +
+            "/object/" +
+            this.targetpid +
+            "/metadata",
+          headers: {
+            "Content-Type": "multipart/form-data",
+            "X-XSRF-TOKEN": this.$store.state.user.token
+          },
+          data: httpFormData
+        });
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          if (response.data.status === 401) {
+            response.data.alerts.push({ type: "danger", msg: "Please log in" });
+          }
+          this.$store.commit("setAlerts", response.data.alerts);
+        }
+        if (response.data.status === 200) {
+          if (response.data.pid) {
+            this.$emit("object-saved", this.targetpid);
+          }
+        }
+      } catch (error) {
+        console.log(error);
+        this.$store.commit("setAlerts", [{ type: "danger", msg: error }]);
+      } finally {
+        this.$vuetify.goTo(0);
+        this.loading = false;
+      }
+    },
+    addField: function(arr, f) {
+      var newField = arrays.duplicate(arr, f);
+      if (newField) {
+        newField.id = new Date().getTime();
+        newField.firstname = "";
+        newField.lastname = "";
+        newField.identifierText = "";
+        newField.removable = true;
+      }
+    },
+    addEntityClear: function(arr, f) {
+      var newField = arrays.duplicate(arr, f);
+      if (newField) {
+        newField.id = new Date().getTime();
+        newField.role = "";
+        newField.name = "";
+        newField.firstname = "";
+        newField.lastname = "";
+        newField.identifierText = "";
+        newField.affiliation = "";
+        newField.affiliationText = "";
+        newField.affiliationType = "select";
+        newField.organization = "";
+        newField.organizationText = "";
+        newField.organizationType = "select";
+        newField.type = "schema:Person";
+        newField.removable = true;
+      }
+    },
+    removeField: function(arr, f) {
+      arrays.remove(arr, f);
+    },
+    sortFieldUp: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i - 1]) {
+        if (arr[i - 1].ordergroup === f.ordergroup) {
+          arrays.moveUp(arr, f);
+        }
+      }
+    },
+    sortFieldDown: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i + 1]) {
+        if (arr[i + 1].ordergroup === f.ordergroup) {
+          arrays.moveDown(arr, f);
+        }
+      }
+    },
+    addContainedInRole: function(arr, f) {
+      var newField = arrays.duplicate(arr, f);
+      if (newField) {
+        newField.id = new Date().getTime();
+        newField.removable = true;
+      }
+    },
+    removeContainedInRole: function(arr, f) {
+      if (arr.length > 1) {
+        arrays.remove(arr, f);
+      }
+    },
+    sortContainedInRoleUp: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i - 1]) {
+        if (arr[i - 1].ordergroup === f.ordergroup) {
+          arrays.moveUp(arr, f);
+        }
+      }
+    },
+    sortContainedInRoleDown: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i + 1]) {
+        if (arr[i + 1].ordergroup === f.ordergroup) {
+          arrays.moveDown(arr, f);
+        }
+      }
+    },
+    sortMemberUp: function(s) {
+      var i = this.form.sections.indexOf(s);
+      if (this.form.sections[i - 1]) {
+        if (this.form.sections[i - 1].type === "member") {
+          arrays.moveUp(this.form.sections, s);
+        }
+      }
+    },
+    sortMemberDown: function(s) {
+      var i = this.form.sections.indexOf(s);
+      if (this.form.sections[i + 1]) {
+        if (this.form.sections[i + 1].type === "member") {
+          arrays.moveDown(this.form.sections, s);
+        }
+      }
+    },
+    addSection: function(s) {
+      var ns = arrays.duplicate(this.form.sections, s);
+      ns.id = new Date().getTime();
+      ns.removable = true;
+      for (var i = 0; i < ns.fields.length; i++) {
+        var id = new Date().getTime();
+        if (i > 0) {
+          id = ns.fields[i - 1].id + 1;
+        }
+        ns.fields[i].id = id;
+        ns.fields[i].value = "";
+        ns.fields[i].language = "";
+      }
+    },
+    removeSection: function(s) {
+      arrays.remove(this.form.sections, s);
+    },
+    selectJournal: function(f, event) {
+      if (event.title) {
+        f.title = event.title;
+      }
+      if (event.issn) {
+        f.issn = event.issn;
+      }
+    },
+    affiliationSelectInput: function(f, event) {
+      f.affiliation = "";
+      f.affiliationSelectedName = [];
+      if (event) {
+        f.affiliation = event["@id"];
+        var preflabels = event["skos:prefLabel"];
+        Object.entries(preflabels).forEach(([key, value]) => {
+          f.affiliationSelectedName.push({ "@value": value, "@language": key });
+        });
+      }
+    },
+    publisherSelectInput: function(f, event) {
+      f.publisherOrgUnit = "";
+      f.publisherSelectedName = [];
+      if (event) {
+        f.publisherOrgUnit = event["@id"];
+        var preflabels = event["skos:prefLabel"];
+        Object.entries(preflabels).forEach(([key, value]) => {
+          f.publisherSelectedName.push({ "@value": value, "@language": key });
+        });
+      }
+    },
+    publisherSuggestInput: function(f, event) {
+      if (event) {
+        f.publisherName = event["name"];
+      }
+    },
+    organizationSelectInput: function(f, event) {
+      f.organization = "";
+      f.organizationSelectedName = [];
+      if (event) {
+        f.organization = event["@id"];
+        var preflabels = event["skos:prefLabel"];
+        Object.entries(preflabels).forEach(([key, value]) => {
+          f.organizationSelectedName.push({
+            "@value": value,
+            "@language": key
+          });
+        });
+      }
+    },
+    setSelected: function(f, property, event) {
+      if (event) {
+        f[property] = event["@id"];
+      }
+      this.$emit("form-input-" + f.component, f);
+      // eg on
+      // v-on:input-identifier-type="setSelected(f, 'identifierType', $event)"
+      // the identifierType property of the component should be updated via
+      // v-bind.sync="f"
+      // because we changed f in this method
+      // but it seems to not work lately....
+      this.$forceUpdate();
+    },
+    updateSubject: function(f, event) {
+      f["skos:prefLabel"] = event["skos:prefLabel"];
+      if (f["skos:prefLabel"]) {
+        if (f["skos:prefLabel"].length > 0) {
+          // needed to init the search input if loading from template
+          // will be synced with component's initquery prop
+          f.initquery = f["skos:prefLabel"][0]["@value"];
+        }
+      }
+      f["rdfs:label"] = event["rdfs:label"];
+      this.$emit("form-input-" + f.component, f);
+    },
+    updatePlace: function(f, event) {
+      f["skos:prefLabel"] = event["skos:prefLabel"];
+      if (f["skos:prefLabel"]) {
+        if (f["skos:prefLabel"].length > 0) {
+          // needed to init the search input if loading from template
+          // will be synced with component's initquery prop
+          f.initquery = f["skos:prefLabel"][0]["@value"];
+        }
+      }
+      f["rdfs:label"] = event["rdfs:label"];
+      f.coordinates = event.coordinates;
+      this.$emit("form-input-" + f.component, f);
+    },
+    selectInput: function(f, event) {
+      if (event) {
+        f.value = event["@id"];
+        if (event["@type"]) {
+          f.type = event["@type"];
+        }
+        if (event["skos:prefLabel"]) {
+          let preflabels = event["skos:prefLabel"];
+          f["skos:prefLabel"] = [];
+          Object.entries(preflabels).forEach(([key, value]) => {
+            f["skos:prefLabel"].push({ "@value": value, "@language": key });
+          });
+        }
+        if (event["rdfs:label"]) {
+          let rdfslabels = event["rdfs:label"];
+          if (rdfslabels) {
+            f["rdfs:label"] = [];
+            Object.entries(rdfslabels).forEach(([key, value]) => {
+              f["rdfs:label"].push({ "@value": value, "@language": key });
+            });
+          }
+        }
+        if (event["skos:notation"]) {
+          f["skos:notation"] = event["skos:notation"];
+        }
+      } else {
+        f.value = "";
+        f["skos:prefLabel"] = [];
+        f["rdfs:label"] = [];
+        f["skos:notation"] = [];
+      }
+      this.$emit("form-input-" + f.component, f);
+    },
+    roleInput: function(f, event) {
+      f.role = event["@id"];
+      this.$emit("form-input-" + f.component, f);
+    },
+    containedInRoleInput: function(f, event) {
+      for (let r of f.roles) {
+        if (r.id === event.role.id) {
+          if (event.roleTerm) {
+            r.role = event.roleTerm["@id"];
+          }
+          if (event.name) {
+            r.name = event.name;
+          }
+          if (event.firstname) {
+            r.firstname = event.firstname;
+          }
+          if (event.lastname) {
+            r.lastname = event.lastname;
+          }
+        }
+      }
+    },
+    setFilename: function(f, event) {
+      f.value = event.name;
+      f.file = event;
+      this.$emit("form-input-" + f.component, f);
+    },
+    addFieldAutocompleteFilter: function(item, queryText) {
+      const lab = this.$t(item["fieldname"]).toLowerCase();
+      const query = queryText.toLowerCase();
+      return lab.indexOf(query) > -1;
+    },
+    removeFieldChip(item) {
+      const index = this.addfieldselection.indexOf(item);
+      if (index >= 0) this.addfieldselection.splice(index, 1);
+    },
+    addFields(section) {
+      for (var i = 0; i < this.addfieldselection.length; i++) {
+        let f = fields.getField(this.addfieldselection[i].id);
+        f.removable = true;
+        section.fields.push(f);
+      }
+      this.addfieldselection = [];
+      section["adddialogue"] = false;
+    }
+  },
+  mounted: function() {
+    this.$store.dispatch("loadLanguages", this.$i18n.locale);
+  }
+};
+</script>
+
+<style scoped>
+.v-btn {
+  margin: 0;
+}
+.prewrap {
+  white-space: pre-wrap;
+}
+</style>
\ No newline at end of file
diff --git a/src/components/input/phaidra_inputs/PILiteral.vue b/src/components/input/phaidra_inputs/PILiteral.vue
index 978b40e4a44ae96f1b9a0fdb2704b19e50551dc8..969fef50780c2bd1e58ad2fa4ec56a9c72a91f3f 100644
--- a/src/components/input/phaidra_inputs/PILiteral.vue
+++ b/src/components/input/phaidra_inputs/PILiteral.vue
@@ -24,10 +24,10 @@
 </template>
 
 <script>
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-literal',
+  name: "p-i-literal",
   mixins: [fieldproperties],
   props: {
     value: {
@@ -38,7 +38,7 @@ export default {
       required: true
     }
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIProject.vue b/src/components/input/phaidra_inputs/PIProject.vue
index 4db1bedc7882adcc5248d73ef3863af4f98a257a..83937849d7376ddd6d04c870b36e5cc8defadad6 100644
--- a/src/components/input/phaidra_inputs/PIProject.vue
+++ b/src/components/input/phaidra_inputs/PIProject.vue
@@ -126,7 +126,7 @@
 
 <script>
 import { vocabulary } from "../../../mixins/vocabulary";
-import { fieldproperties } from "../../mixins/fieldproperties";
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
   name: "p-i-project",
diff --git a/src/components/input/phaidra_inputs/PISpatialGettyReadonly.vue b/src/components/input/phaidra_inputs/PISpatialGettyReadonly.vue
index cc9e643fa48f3744b9fb476f39b43d29bd3be47f..4b952e7e75f4257f8ee6265f3f2f1b43ae6c87da 100644
--- a/src/components/input/phaidra_inputs/PISpatialGettyReadonly.vue
+++ b/src/components/input/phaidra_inputs/PISpatialGettyReadonly.vue
@@ -25,40 +25,40 @@
   </v-layout>
 </template>
 <script>
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-spatial-getty-readonly',
+  name: "p-i-spatial-getty-readonly",
   mixins: [fieldproperties],
   computed: {
     rdfsLabels: function() {
-      var i
-      var arr = []
-      if (this['rdfs:label']) {
-        for (i = 0; i < this['rdfs:label'].length; i++) {
-          arr.push(this['rdfs:label'][i]['@value'])
+      var i;
+      var arr = [];
+      if (this["rdfs:label"]) {
+        for (i = 0; i < this["rdfs:label"].length; i++) {
+          arr.push(this["rdfs:label"][i]["@value"]);
         }
       }
-      return arr
+      return arr;
     },
     prefLabel: function() {
-      var i
-      var prefLabel = ''
+      var i;
+      var prefLabel = "";
       // just return any now
-      if (this['skos:prefLabel']) {
-        for (i = 0; i < this['skos:prefLabel'].length; i++) {
-          return this['skos:prefLabel'][i]['@value']
+      if (this["skos:prefLabel"]) {
+        for (i = 0; i < this["skos:prefLabel"].length; i++) {
+          return this["skos:prefLabel"][i]["@value"];
         }
       }
-      return prefLabel
+      return prefLabel;
     }
   },
   props: {
-    'skos:prefLabel': {
+    "skos:prefLabel": {
       type: Array,
       required: true
     },
-    'rdfs:label': {
+    "rdfs:label": {
       type: Array
     },
     value: {
@@ -81,5 +81,5 @@ export default {
       default: true
     }
   }
-}
+};
 </script>
\ No newline at end of file
diff --git a/src/components/input/phaidra_inputs/PISubjectGnd.vue b/src/components/input/phaidra_inputs/PISubjectGnd.vue
index fc6d7a9ba42b4b4d6c7388e20348f4888033a1ea..589a80c44893f6c574e26f43064a60948ee825f3 100644
--- a/src/components/input/phaidra_inputs/PISubjectGnd.vue
+++ b/src/components/input/phaidra_inputs/PISubjectGnd.vue
@@ -34,11 +34,11 @@
 </template>
 
 <script>
-import qs from 'qs'
-import { fieldproperties } from '../../mixins/fieldproperties'
+import qs from "qs";
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-subject-gnd',
+  name: "p-i-subject-gnd",
   mixins: [fieldproperties],
   props: {
     value: {
@@ -50,7 +50,7 @@ export default {
     },
     voc: {
       type: String,
-      default: 'SubjectHeading'
+      default: "SubjectHeading"
     },
     exactvoc: {
       type: String
@@ -71,122 +71,132 @@ export default {
     }
   },
   watch: {
-    search (val) {
-      val && this.querySuggestionsDebounce(val)
+    search(val) {
+      val && this.querySuggestionsDebounce(val);
     },
-    value (val) {
-      val && this.resolve(val)
+    value(val) {
+      val && this.resolve(val);
     }
   },
-  data () {
+  data() {
     return {
       items: [],
       loading: false,
       model: null,
       search: null,
       debounceTask: undefined,
-      preflabel: '',
-      rdfslabel: '',
+      preflabel: "",
+      rdfslabel: "",
       coordinates: [],
-      resolved: ''
-    }
+      resolved: ""
+    };
   },
   methods: {
-    resolve: function (uri) {
-      var self = this
+    resolve: function(uri) {
+      var self = this;
 
       if (uri) {
-        self.loading = true
+        self.loading = true;
 
         var params = {
           uri: uri
-        }
+        };
 
-        var query = qs.stringify(params)
+        var query = qs.stringify(params);
 
-        fetch(self.$store.state.settings.instance.api + '/resolve/?' + query, {
-          method: 'GET',
-          mode: 'cors'
-        })
-        .then(function (response) {
-          return response.json()
+        fetch(self.$store.state.settings.instance.api + "/resolve/?" + query, {
+          method: "GET",
+          mode: "cors"
         })
-        .then(function (json) {
-          self.loading = false
-          self.preflabel = json[uri]['skos:prefLabel']
-          self.rdfslabel = json[uri]['rdfs:label']
-          if (self.rdfslabel) {
-            var rdfslabelarr = []
-            for (var i = 0; i < self.rdfslabel.length; i++) {
-              rdfslabelarr.push(self.rdfslabel[i]['@value'])
+          .then(function(response) {
+            return response.json();
+          })
+          .then(function(json) {
+            self.loading = false;
+            self.preflabel = json[uri]["skos:prefLabel"];
+            self.rdfslabel = json[uri]["rdfs:label"];
+            if (self.rdfslabel) {
+              var rdfslabelarr = [];
+              for (var i = 0; i < self.rdfslabel.length; i++) {
+                rdfslabelarr.push(self.rdfslabel[i]["@value"]);
+              }
+              self.resolved =
+                'Synonym: <a href="' +
+                uri +
+                '" target="_blank">' +
+                rdfslabelarr.join(", ") +
+                "</a>";
+            } else {
+              self.resolved = "";
             }
-            self.resolved = 'Synonym: <a href="' + uri + '" target="_blank">' + rdfslabelarr.join(', ') + '</a>'
-          } else {
-            self.resolved = ''
-          }
-          self.$emit('resolve', { 'skos:prefLabel': self.preflabel, 'rdfs:label': self.rdfslabel })
-        })
-        .catch(function (error) {
-          console.log(error)
-          self.loading = false
-        })
+            self.$emit("resolve", {
+              "skos:prefLabel": self.preflabel,
+              "rdfs:label": self.rdfslabel
+            });
+          })
+          .catch(function(error) {
+            console.log(error);
+            self.loading = false;
+          });
       }
     },
-    querySuggestionsDebounce (q) {
+    querySuggestionsDebounce(q) {
       if (this.debounce) {
-        if (this.debounceTask !== undefined) clearTimeout(this.debounceTask)
+        if (this.debounceTask !== undefined) clearTimeout(this.debounceTask);
         this.debounceTask = setTimeout(() => {
-          return this.querySuggestions(q)
-        }, this.debounce)
+          return this.querySuggestions(q);
+        }, this.debounce);
       } else {
-        return this.querySuggestions(q)
+        return this.querySuggestions(q);
       }
     },
-    querySuggestions (q) {
-      var self = this
+    querySuggestions(q) {
+      var self = this;
 
-      self.loading = true
+      self.loading = true;
 
       var params = {
         count: 20,
         searchterm: q
-      }
+      };
 
       if (this.voc) {
-        params['type'] = this.voc
+        params["type"] = this.voc;
       }
 
       if (this.exactvoc) {
-        params['exact_type'] = this.exactvoc
+        params["exact_type"] = this.exactvoc;
       }
 
-      var query = qs.stringify(params)
+      var query = qs.stringify(params);
 
-      fetch(self.$store.state.settings.global.suggesters.gnd + '?' + query, {
-        method: 'GET',
-        mode: 'cors'
-      })
-      .then(function (response) { return response.json() })
-      .then(function (json) {
-        for (var i = 0; i < json[1].length; i++) {
-          self.items.push({ text: json[1][i], value: json[3][i] })
-        }
-        self.loading = false
+      fetch(self.$store.state.settings.global.suggesters.gnd + "?" + query, {
+        method: "GET",
+        mode: "cors"
       })
-      .catch(function (error) {
-        console.log(error)
-      })
-      .finally(() => (self.loading = false))
+        .then(function(response) {
+          return response.json();
+        })
+        .then(function(json) {
+          for (var i = 0; i < json[1].length; i++) {
+            self.items.push({ text: json[1][i], value: json[3][i] });
+          }
+          self.loading = false;
+        })
+        .catch(function(error) {
+          console.log(error);
+        })
+        .finally(() => (self.loading = false));
     }
   },
-  mounted: function () {
+  mounted: function() {
     if (this.initquery) {
-      this.items = [{ value: this.value, text: this.initquery }]
-      this.model = { value: this.value, text: this.initquery }
-      this.resolve(this.value)
+      this.items = [{ value: this.value, text: this.initquery }];
+      this.model = { value: this.value, text: this.initquery };
+      this.resolve(this.value);
     }
   }
-}
+};
 </script>
 
 <style scoped>
diff --git a/src/components/input/phaidra_inputs/PIVocabExtReadonly.vue b/src/components/input/phaidra_inputs/PIVocabExtReadonly.vue
index 559c82b0e219ba1172f062f4f2d6332011ccb3bc..147b6b622678cf864f3b5c660d9ed6646abd6418 100644
--- a/src/components/input/phaidra_inputs/PIVocabExtReadonly.vue
+++ b/src/components/input/phaidra_inputs/PIVocabExtReadonly.vue
@@ -25,66 +25,71 @@
   </v-layout>
 </template>
 <script>
-import { fieldproperties } from '../../mixins/fieldproperties'
+import { fieldproperties } from "../../../mixins/fieldproperties";
 
 export default {
-  name: 'p-i-vocab-ext-readonly',
+  name: "p-i-vocab-ext-readonly",
   mixins: [fieldproperties],
   computed: {
     rdfsLabels: function() {
-      var i
-      var arr = []
-      if (this['rdfs:label']) {
-        for (i = 0; i < this['rdfs:label'].length; i++) {
-          arr.push(this['rdfs:label'][i]['@value'])
+      var i;
+      var arr = [];
+      if (this["rdfs:label"]) {
+        for (i = 0; i < this["rdfs:label"].length; i++) {
+          arr.push(this["rdfs:label"][i]["@value"]);
         }
       }
-      return arr
+      return arr;
     },
     prefLabel: function() {
-      var i
-      var prefLabel = ''
+      var i;
+      var prefLabel = "";
       // just return any now
-      if (this['skos:prefLabel']) {
-        for (i = 0; i < this['skos:prefLabel'].length; i++) {
-          return this['skos:prefLabel'][i]['@value']
+      if (this["skos:prefLabel"]) {
+        for (i = 0; i < this["skos:prefLabel"].length; i++) {
+          return this["skos:prefLabel"][i]["@value"];
         }
       }
-      return prefLabel
+      return prefLabel;
     },
     notation: function() {
-      var i
-      if (this['skos:notation']) {
-        for (i = 0; i < this['skos:notation'].length; i++) {
-          return this['skos:notation'][i]
+      var i;
+      if (this["skos:notation"]) {
+        for (i = 0; i < this["skos:notation"].length; i++) {
+          return this["skos:notation"][i];
         }
       }
-      return false
+      return false;
     },
     messages: function() {
-      var ret
-      if (this['skos:exactMatch']) {
-        ret = '<a href="' + this['skos:exactMatch'][0] + '" target="_blank">' + this['skos:exactMatch'][0] + '</a>'
+      var ret;
+      if (this["skos:exactMatch"]) {
+        ret =
+          '<a href="' +
+          this["skos:exactMatch"][0] +
+          '" target="_blank">' +
+          this["skos:exactMatch"][0] +
+          "</a>";
       }
-      if (this['skos:notation']) {
-        ret = ret + (ret ? ret + ' ' : '') + 'Notation: ' + notation  
+      if (this["skos:notation"]) {
+        ret = ret + (ret ? ret + " " : "") + "Notation: " + notation;
       }
-      return ret
+      return ret;
     }
   },
   props: {
-    'skos:prefLabel': {
+    "skos:prefLabel": {
       type: Array,
       required: true
     },
-    'rdfs:label': {
+    "rdfs:label": {
       type: Array
     },
-    'skos:exactMatch': {
+    "skos:exactMatch": {
       type: Array,
       required: true
     },
-    'skos:notation': {
+    "skos:notation": {
       type: Array
     },
     label: {
@@ -100,5 +105,5 @@ export default {
       default: true
     }
   }
-}
+};
 </script>
\ No newline at end of file
diff --git a/src/components/input/pharma-input-fields/PISelect.vue b/src/components/input/pharma-input-fields/PISelect.vue
index dc0312bc94974811a6b3ad934e90e2468dbeb0d5..728dd6b19c368c74a1fa7c56dab88464a7b3fc81 100644
--- a/src/components/input/pharma-input-fields/PISelect.vue
+++ b/src/components/input/pharma-input-fields/PISelect.vue
@@ -2,11 +2,12 @@
   <v-form lazy-validation ref="form" v-model="valid">
     <v-layout row>
       <v-flex xs8>
+        
         <v-autocomplete
           :value="getTerm(vocabulary, value)"
           :required="required"
           v-on:input="$emit('input', $event);validate(); $emit('validation', validationWarning)"
-          :rules="required ? [ v => !!v || 'Required'] : []"
+          :rules="required ? [ v => !!v|| 'Required'] : []"
           :items="vocabularies[vocabulary].terms"
           :loading="loading"
           :filter="autocompleteFilter"
@@ -94,12 +95,18 @@ export default {
         if (this.$refs.form.validate()) {
           this.validationWarning = false;
         } else {
+          console.log("here");
           this.validationWarning = true;
         }
       } else {
+        console.log("here 2", this.formValidation);
         this.validationWarning = false;
       }
-      console.log("validationWarning", this.validationWarningI);
+      /*console.log(
+        "validationWarning",
+        this.$refs.form.validate(),
+        this.validationWarning
+      );*/
     }
   },
   mounted: function() {
diff --git a/src/components/input/pharma-input-fields/PhAssaySelection.vue b/src/components/input/pharma-input-fields/PhAssaySelection.vue
index 3bd24d98bd16f658b042e2cd67cbe30ffbbdaeaa..e7ab4ca529db6e63d0dd5666dc1e8335f840b3a2 100644
--- a/src/components/input/pharma-input-fields/PhAssaySelection.vue
+++ b/src/components/input/pharma-input-fields/PhAssaySelection.vue
@@ -38,7 +38,7 @@
               </v-flex>
               <!-- do we even need this freefield if , we are in the selct section...?-->
 
-              <v-flex v-if="freeField">
+              <v-flex v-if="freefield">
                 <v-tooltip bottom>
                   <v-btn
                     slot="activator"
@@ -176,7 +176,7 @@ export default {
     freeText: {
       type: Object
     },
-    freeField: {
+    freefield: {
       type: Boolean
     },
     info: {
diff --git a/src/components/input/pharma-input-fields/PhEntity.vue b/src/components/input/pharma-input-fields/PhEntity.vue
index 096a22a275a991ca7211641e322e01454afc4c2e..acebd96b304ede18a8f2cc5939f01697a52e7e67 100644
--- a/src/components/input/pharma-input-fields/PhEntity.vue
+++ b/src/components/input/pharma-input-fields/PhEntity.vue
@@ -107,7 +107,7 @@
                 {'@value': 'University of Vienna'}]}"
                 :multiplicable="true"
                 :required="true"
-                :freeField="true"
+                :freefield="true"
                 :freeText="{ '@type': 'schema:Organization','schema:name': [
                 {'@value': 'No value'}]}"
                 v-on:input-select="$emit('input-organisation',$event)"
diff --git a/src/components/input/pharma-input-fields/PhExtService.vue b/src/components/input/pharma-input-fields/PhExtService.vue
index 7fbec242dff08191f5cf24217d321fbcb110b149..da768199d03ec0310327a8e0612c676065738ed4 100644
--- a/src/components/input/pharma-input-fields/PhExtService.vue
+++ b/src/components/input/pharma-input-fields/PhExtService.vue
@@ -9,7 +9,6 @@
           :loading="loading"
           hide-no-data
           hide-selected
-          no-filter
           placeholder="Start typing to Search"
           :required="required"
           :search-input.sync="search"
@@ -670,6 +669,9 @@ export default {
               metadata: result[i]
             });
           }
+          self.items.sort(function(a, b) {
+            return a.selectText.length - b.selectText.length;
+          });
           self.loading = false;
         })
         .catch(function(error) {
diff --git a/src/components/input/pharma-input-fields/PhExtServiceTreeview.vue b/src/components/input/pharma-input-fields/PhExtServiceTreeview.vue
index 81f00d2aefedf979ac6649cf3f0acf9f4e6d21b0..a69ee056f792fdd4c571426cfb49e2d15093c91b 100644
--- a/src/components/input/pharma-input-fields/PhExtServiceTreeview.vue
+++ b/src/components/input/pharma-input-fields/PhExtServiceTreeview.vue
@@ -14,6 +14,10 @@
         <v-flex xs6>
           <v-layout row wrap fill-height>
             <v-flex xs6>
+              <v-btn @click="alert($refs.treeview.items)">view</v-btn>
+              <v-btn
+                @click="unselectNode($refs.treeview.items,'http://purl.obolibrary.org/obo/NCIT_C28398')"
+              >find</v-btn>
               <v-btn @click="$refs.treeview.updateAll(true)">Open next level</v-btn>
               <v-btn @click="$refs.treeview.updateAll(false)">Close all</v-btn>
             </v-flex>
@@ -44,6 +48,7 @@
                       ></v-checkbox>
                     </div>
                   </template>
+
                   <template v-slot:prepend="{ item}">
                     <span v-if="!item.children"></span>
                   </template>
@@ -62,7 +67,7 @@
               :key="i"
               label
               close
-              @input="selectedItems=[]"
+              @input="selectedItems.splice(i,1);unselectNode($refs.treeview.items,data.id)"
             >
               <span>{{ data.text }}</span>
             </v-chip>
@@ -182,6 +187,33 @@ export default {
     }
   },
   methods: {
+    unselectNode: function(tree, id) {
+      var n_ar = tree;
+
+      for (var nodes in n_ar) {
+        if (n_ar[nodes].id === id) {
+          // console.log(
+          //   "matching node",
+          //   n_ar[nodes],
+          //   n_ar[nodes].text,
+          //   n_ar[nodes].selected
+          // );
+          n_ar[nodes].selected = false;
+        }
+        if (
+          n_ar[nodes].children !== null &&
+          n_ar[nodes].children.length > 0 &&
+          typeof n_ar[nodes].children === "object"
+        ) {
+          //for each chil call again this fction
+          this.unselectNode(n_ar[nodes].children, id);
+        }
+      }
+    },
+
+    alert: function(a) {
+      console.log("alert", a);
+    },
     select: function(item) {
       if (item.selected) {
         //push it to selected items but first check if it's there first
@@ -199,6 +231,18 @@ export default {
         }
       }
     },
+    deselect: function(item, tree) {
+      //push it to selected items but first check if it's there first
+
+      if (this.selectedItems.indexOf(item) > -1) {
+        //item has been selected;
+        var index = this.selectedItems.indexOf(item);
+
+        this.selectedItems.splice(index, 1);
+      } else {
+        //console.log("item ", item);
+      }
+    },
     init: function(e) {
       //console.log("in console", e);
       e = [];
@@ -256,6 +300,10 @@ export default {
               });
             } else {
             }
+          } //alphabetical sorting:
+          if (item.children) {
+            //console.log(item.children);
+            item.children.sort((a, b) => (a.text > b.text ? 1 : -1));
           }
         })
         .catch(function(error) {
diff --git a/src/components/input/pharma-input-fields/PhFiles.vue b/src/components/input/pharma-input-fields/PhFiles.vue
index 72ed094f92e578f1cf0c159a59ccce36ecbeeee5..6da04079869dbc098176b4edaa4a1e1688aabbe1 100644
--- a/src/components/input/pharma-input-fields/PhFiles.vue
+++ b/src/components/input/pharma-input-fields/PhFiles.vue
@@ -1,28 +1,10 @@
 <template>
   <v-container fluid>
-    <v-card-title class="title grey lighten-2 white--text">
-      <span>Select the files for your current submission</span>
-    </v-card-title>
     <v-layout column class="uploadBox">
-      <v-flex class="uploadBoxMain" v-if="loaderVisible">
-        <v-flex
-          class="dropArea"
-          @dragenter="dragging=true"
-          @dragleave="dragging=false"
-          @ondragover="setFilename($event)"
-        >
-          <!-- @ondragover="$emit('input-file',$event); setFilename($event.target.files)"-->
-          <!-- <v-flex
-          class="dropArea"
-         @dragenter="dragging=true"
-          @dragleave="dragging=false"
-          @ondragover="setFilename($event.target.files);"
-          >-->
-          <h4>Drop multiple files here</h4>
-          <input type="file" required multiple @change="setFilename($event);" />
-          <p>or click to upload</p>
-        </v-flex>
-      </v-flex>
+      <v-card-title class="title grey lighten-2 white--text">
+        <span>Select the files for your current submission</span>
+      </v-card-title>
+
       <!-- @change="$emit('input-file',$event);setFilename($event.target.files);"-->
       <v-flex class="uploadBoxMain" v-if="itemsAdded">
         <v-layout row wrap xs v-for="i in itemsNames.length" :key="i" xs12>
@@ -40,19 +22,20 @@
               return-object
             ></v-select>
           </v-flex>
-          <v-flex xs2 v-if="!FileExtFreefield[i-1]">
+
+          <v-flex xs2 v-if="!FileExtfreefield[i-1]">
             <v-text-field :value="items[i-1]['type']" label="File extension" disabled></v-text-field>
           </v-flex>
-          <v-flex v-if="!FileExtFreefield[i-1]">
+          <v-flex v-if="!FileExtfreefield[i-1]">
             <v-tooltip bottom>
-              <v-btn slot="activator" small icon v-on:click="setArray(FileExtFreefield,i-1,true)">
+              <v-btn slot="activator" small icon v-on:click="setArray(FileExtfreefield,i-1,true)">
                 <v-icon>list</v-icon>
               </v-btn>
               <span>Change input</span>
             </v-tooltip>
           </v-flex>
 
-          <v-flex xs2 v-if="FileExtFreefield[i-1]">
+          <v-flex xs2 v-if="FileExtfreefield[i-1]===true">
             <v-select
               item-text="@id"
               :label="'File extension'"
@@ -64,9 +47,9 @@
               return-object
             ></v-select>
           </v-flex>
-          <v-flex v-if="FileExtFreefield[i-1]">
+          <v-flex v-if="FileExtfreefield[i-1]">
             <v-tooltip bottom>
-              <v-btn slot="activator" small icon v-on:click="setArray(FileExtFreefield,i-1,false)">
+              <v-btn slot="activator" small icon v-on:click="setArray(FileExtfreefield,i-1,true)">
                 <v-icon>remove</v-icon>
               </v-btn>
               <span>Remove input</span>
@@ -80,9 +63,29 @@
               v-on:input="setArray(itemsDesc,i-1,$event);$emit('input-description', itemsDesc)"
             ></v-text-field>
           </v-flex>
-          <v-btn outline color="indigo" small icon @click="removeOneItem(i-1)">
-            <icon name="material-content-remove" width="12px" height="12px"></icon>
-          </v-btn>
+          <v-flex xs12>
+           
+            <v-layout row wrap justify-end>
+              <v-flex xs4>
+         
+                <p-i-select
+                  vocabulary="licenses"
+                  label="License"
+                  :value="itemsLicense[i-1]"
+                  :warning="true"
+                  :required="true"
+                  :formValidation="true"
+                  definition="The value will indicate the copyright, usage and access rights that apply to this digital representation."
+                  v-on:input="setArray(itemsLicense,i-1,selectId($event));$emit('input-license', itemsLicense)"
+                  v-on:validation="setMytry($event),setArray(itemsWarning,i-1,$event); $emit('input-warning', itemsWarning)"
+                ></p-i-select>
+              </v-flex>
+
+              <v-btn outline color="indigo" small icon @click="removeOneItem(i-1)">
+                <icon name="material-content-remove" width="12px" height="12px"></icon>
+              </v-btn>
+            </v-layout>
+          </v-flex>
         </v-layout>
         <v-layout row wrap>
           <v-flex>
@@ -97,6 +100,25 @@
           </v-flex>
         </v-layout>
       </v-flex>
+      <v-flex class="uploadBoxMain" v-if="loaderVisible">
+        <v-flex
+          class="dropArea"
+          @dragenter="dragging=true"
+          @dragleave="dragging=false"
+          @ondragover="setFilename($event)"
+        >
+          <!-- @ondragover="$emit('input-file',$event); setFilename($event.target.files)"-->
+          <!-- <v-flex
+          class="dropArea"
+         @dragenter="dragging=true"
+          @dragleave="dragging=false"
+          @ondragover="setFilename($event.target.files);"
+          >-->
+          <h4>Drop multiple files here</h4>
+          <input type="file" required multiple @change="setFilename($event);" />
+          <p>or click to upload</p>
+        </v-flex>
+      </v-flex>
       <v-layout row wrap>
         <v-btn v-if="!loaderVisible" @click="removeItems">Remove all</v-btn>
         <v-btn v-if="!loaderVisible" @click="loaderVisible=true">Add more</v-btn>
@@ -111,15 +133,17 @@ import "@/compiled-icons/material-content-remove";
 import "@/compiled-icons/material-hardware-arrow-down";
 import "@/compiled-icons/material-hardware-arrow-up";
 import PhTextselected from "./PhTextselected";
+import PISelect from "./PISelect";
 
 export default {
   name: "ph-files",
   components: {
-    PhTextselected
+    PhTextselected,
+    PISelect
   },
   computed: {
     vocabularies: function() {
-      return this.$store.state.vocabularyPharma.vocabularies;
+      return this.$store.state.vocabulary.vocabularies;
     }
   },
   props: {
@@ -145,6 +169,7 @@ export default {
   },
   data() {
     return {
+      mytry: false,
       items: [],
       //items: [0],
       //dragging: false,
@@ -153,26 +178,38 @@ export default {
       itemsType: [],
       itemsExt: [],
       itemsDesc: [],
+      itemsLicense: [],
       itemsSizes: [],
+      itemsWarning: [],
       readonly: true,
       itemsTotalSize: "",
       //successMsg: '',
       //errorMsg: '',
       loaderVisible: true,
       dragging: false,
-      FileExtFreefield: []
+      FileExtfreefield: [],
+      licenseInit: "http://rightsstatements.org/vocab/InC/1.0/"
     };
   },
 
   methods: {
-    validate: function() {
-      //just check if there is at least one file
+    setMytry: function(e) {
+      this.mytry = e;
+    },
+    alert: function(e) {
+      console.log("alert", e);
+    },
+    selectId: function(event) {
+      if (event) {
+        return event["@id"];
+      } else return "";
     },
     setArray: function(array, index, val) {
       array.splice(index, 1, val);
     },
-    setFreefield: function(index, val) {
-      this.FileExtFreefield.splice(index, 1, val);
+    setExt: function(index, val) {
+      this.FileExtfreefield[index] = val;
+      //console.log("in set elem", this.FileExtfreefield);
     },
 
     // http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/
@@ -183,10 +220,43 @@ export default {
       if (i === 0) return bytes + " " + sizes[i];
       return (bytes / Math.pow(1024, i)).toFixed(2) + " " + sizes[i];
     },
+    initialiseFileItems: function(i) {
+      if (this.itemsExt[i] == null) {
+        this.itemsExt[i] = this.items[i].type;
+      }
+      if (this.FileExtfreefield[i] == null) {
+        this.FileExtfreefield[i] = false;
+      }
+      if (this.itemsType[i] == null) {
+        this.itemsType[i] = "";
+      }
+      if (this.itemsDesc[i] == null) {
+        this.itemsDesc[i] = "";
+      }
+      if (this.itemsLicense[i] == null) {
+        this.itemsLicense[i] = "";
+      }
+    },
+    commitFileItems: function() {
+      this.$emit("input-file", this.items);
+      if (this.items.length > 0) {
+        this.$emit("validation", false);
+      } else {
+        this.$emit("validation", true);
+      }
+      //this.$store.commit("setFiles", this.itemsNames);
+
+      this.$emit("input-name", this.itemsNames);
+      this.$emit("input-extension", this.itemsExt);
+      this.$emit("input-license", this.itemsLicense);
+      this.$emit("input-warning", this.itemsWarning);
+
+      this.$emit("input-type", this.itemsType);
+      this.$emit("input-description", this.itemsDesc);
+    },
+
     setFilename(e) {
       this.loaderVisible = false;
-      //this.successMsg = ''
-      //this.errorMsg = ''
 
       let files = e.target.files;
 
@@ -220,32 +290,16 @@ export default {
       var fileSizes = 0;
       for (var i = 0; i < this.items.length; i++) {
         this.itemsNames[i] = this.items[i].name;
-        this.itemsExt[i] = this.items[i].type;
-        this.itemsType[i] = "";
-        this.itemsDesc[i] = "";
+
+        this.initialiseFileItems(i);
+        this.$emit("input-numberFiles", this.items.length);
+        this.itemsWarning[i] = true;
         this.itemsSizes[i] = this.bytesToSize(this.items[i].size);
         fileSizes += this.items[i].size;
       }
       this.itemsTotalSize = this.bytesToSize(fileSizes);
       this.itemsAdded = this.items.length;
-      // console.log(
-      //   "files",
-      //   this.items,
-      //   "names",
-      //   this.itemsNames,
-      //   "exten",
-      //   this.itemsExt
-      // );
-      this.$emit("input-file", this.items);
-      if (this.items.length > 0) {
-        this.$emit("validation", false);
-      } else {
-        this.$emit("validation", true);
-      }
-      this.$store.commit("setFiles", this.itemsNames);
-      this.$emit("input-numberFiles", this.items.length);
-      this.$emit("input-name", this.itemsNames);
-      this.$emit("input-extension", this.itemsExt);
+      this.commitFileItems();
     },
     removeItems() {
       this.items = [];
@@ -255,20 +309,21 @@ export default {
       this.itemsType = [];
       this.itemsDesc = [];
       this.itemsSizes = [];
+      this.itemsLicense = [];
+      this.itemsWarning = [];
+      this.FileExtfreefield = [];
       this.itemsTotalSize = "";
       this.loaderVisible = true;
-      if (this.items.length > 0) {
+      /* if (this.items.length > 0) {
         this.$emit("validation", false);
       } else {
         this.$emit("validation", true);
-      }
-      this.$store.commit("setFiles", this.itemsNames);
+      }*/
+      //this.$store.commit("setFiles", this.itemsNames);
+
       this.$emit("input-numberFiles", 0);
-      this.$emit("input-file", this.items);
-      this.$emit("input-name", this.itemsNames);
-      this.$emit("input-extension", this.itemsExt);
-      this.$emit("input-type", this.itemsType);
-      this.$emit("input-description", this.itemsDesc);
+
+      this.commitFileItems();
       //this.dragging = false
     },
     removeOneItem(i) {
@@ -286,6 +341,9 @@ export default {
       this.itemsType.splice(i, 1);
       this.itemsDesc.splice(i, 1);
       this.itemsSizes.splice(i, 1);
+      this.itemsLicense.splice(i, 1);
+      this.itemsWarning.splice(i, 1);
+      this.FileExtfreefield.splice(i, 1);
       for (var i = 0; i < this.items.length; i++) {
         fileSizes += this.items[i].size;
       }
@@ -293,14 +351,16 @@ export default {
         this.loaderVisible = true;
       }
       this.itemsTotalSize = this.bytesToSize(fileSizes);
-
-      this.$emit("input-file", this.items);
+      this.commitFileItems();
+      // this.$emit("input-file", this.items);
       this.$emit("input-numberFiles", this.items.length);
-      this.$store.commit("setFiles", this.itemsNames);
-      this.$emit("input-name", this.itemsNames);
-      this.$emit("input-extension", this.itemsExt);
-      this.$emit("input-type", this.itemsType);
-      this.$emit("input-description", this.itemsDesc);
+      //this.$store.commit("setFiles", this.itemsNames);
+      //this.$emit("input-name", this.itemsNames);
+      //this.$emit("input-extension", this.itemsExt);
+      //this.$emit("input-type", this.itemsType);
+      //this.$emit("input-description", this.itemsDesc);
+      //this.$emit("input-license", this.itemsLicense);
+      //this.$emit("input-warning", this.itemsWarning);
       //this.dragging = false;
     }
   }
diff --git a/src/components/input/pharma-input-fields/PhInputForm.vue b/src/components/input/pharma-input-fields/PhInputForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..c69f3d3fbe47854c59adba2c5b7439bb0808cd08
--- /dev/null
+++ b/src/components/input/pharma-input-fields/PhInputForm.vue
@@ -0,0 +1,786 @@
+<template>
+  <v-container>
+    <v-stepper v-model="stepper" non-linear>
+      <v-stepper-header>
+        <template v-for="(n,index) in stepsTitle">
+          <v-stepper-step
+            :key="`${index}-step`"
+            :edit-icon="'check'"
+            :complete-icon="'edit'"
+            :step="index+1"
+            :complete="stepper>index"
+            editable
+          >{{n}}</v-stepper-step>
+        </template>
+      </v-stepper-header>
+      <v-stepper-items>
+        <v-stepper-content v-for="(n,index) in steps" :key="`${index}-content`" :step="index+1">
+          <v-layout align-center justify-center class="ma-0 pa-0">
+            <v-flex>
+              <div class="text-xs-right">
+                <v-btn v-if="stepper!==1" @click="stepper = index">Back</v-btn>
+                <v-btn
+                  v-if="stepper!==sectionNumbers"
+                  color="primary"
+                  @click="stepper = index+2"
+                >Continue</v-btn>
+              </div>
+            </v-flex>
+          </v-layout>
+        
+          <v-flex v-if="n== 'general'">
+            <v-layout v-for="(f) in s[index].fields" :key="f.id" row wrap fill-height>
+            
+              <v-flex xs12 v-if="f.component === 'text-field'">
+                <v-card-title v-if="f.header !== ''" class="title grey lighten-2 white--text">
+                  <span>{{f.header}}</span>
+                </v-card-title>
+                <ph-text-field
+                  v-bind.sync="f"
+                  v-on:input="f.value=$event"
+                  v-on:input-language="setSelected(f, 'language', $event)"
+                  v-on:textfield-validation="f.warning=$event"
+                  v-on:add="addField(s[index].fields, f)"
+                  v-on:remove="removeField(s[index].fields, f)"
+                ></ph-text-field>
+              </v-flex>
+              <v-flex xs12 v-else-if="f.component === 'pharma-title'">
+                <ph-title
+                  v-bind.sync="f"
+                  v-on:input-title="f.title=$event"
+                  v-on:input-language="setSelected(f, 'language', $event)"
+                  v-on:title-validation="f.warning=$event"
+                ></ph-title>
+              </v-flex>
+              <v-flex xs12 v-else-if="f.component === 'date'">
+                <ph-date
+                  v-bind.sync="f"
+                  v-on:input-date-type="setSelected(f, 'type', $event)"
+                  v-on:input-date="f.value=$event"
+                  v-on:add="addField(s[index].fields, f)"
+                  v-on:remove="removeField(s[index].fields, f)"
+                  v-on:date-validation="f.warning=$event"
+                ></ph-date>
+              </v-flex>
+
+              <v-flex xs12 v-else-if="f.component === 'entity'">
+                <ph-entity
+                  v-bind.sync="f"
+                  v-on:input-firstname="f.firstname=$event"
+                  v-on:input-lastname="f.lastname=$event"
+                  v-on:input-organisation="f.institution=$event"
+                  v-on:input-role="f.role=$event"
+                  v-on:input-orcid="f.orcid=$event"
+                  v-on:input-email="f.email=$event"
+                  v-on:add="addField(s[index].fields, f);alert(f)"
+                  v-on:remove="removeField(s[index].fields, f)"
+                  v-on:up="sortFieldUp(s[index].fields, f)"
+                  v-on:down="sortFieldDown(s[index].fields, f)"
+                  v-on:entity-validation="f.warning=$event"
+                ></ph-entity>
+              </v-flex>
+
+              <v-flex xs12 v-else-if="f.component === 'project'">
+                <ph-project
+                  v-bind.sync="f"
+                  v-on:input-project="f.project=$event; "
+                  v-on:input-agency="f.agency=$event; "
+                  v-on:validation="f.warning=$event"
+                  v-on:add="addField(s[index].fields, f)"
+                  v-on:remove="removeField(s[index].fields, f)"
+                  v-on:up="sortFieldUp(s[index].fields, f)"
+                  v-on:down="sortFieldDown(s[index].fields, f)"
+                ></ph-project>
+              </v-flex>
+
+              <v-flex v-else-if="f.component === 'p-select'">
+                <p-i-select
+                  v-bind.sync="f"
+                  v-on:input="selectInput(f, $event)"
+                  v-on:add="addField(s.fields, f)"
+                  v-on:remove="removeField(s.fields, f)"
+                  v-on:validation="f.warning=$event"
+                ></p-i-select>
+              </v-flex>
+            </v-layout>
+          </v-flex>
+
+          <v-flex v-else-if="n== 'file'">
+            <v-card-text>
+              <v-layout v-for="(f) in s[index].fields" :key="f.id" row wrap>
+           
+                <v-flex v-if="f.component == 'files'">
+                
+                  <ph-files
+                    v-bind.sync="f"
+                    v-on:input-numberFiles="f.nfile=$event;filesNber=f.nfile"
+                    v-on:input-file="f.file=$event"
+                    v-on:input-name="f.fileName=$event"
+                    v-on:input-type="f.fileFormat=$event"
+                    v-on:input-extension="f.fileExtension=$event"
+                    v-on:input-description="f.fileDescription=$event"
+                    v-on:input-license="f.fileLicense=$event"
+                    v-on:input-warning="f.licenseWarning=$event"
+                    v-on:validation="f.warning=$event"
+                  ></ph-files>
+                  
+                </v-flex>
+              </v-layout>
+            </v-card-text>
+          </v-flex>
+
+          <v-flex v-else-if="n== 'content'">
+            <v-layout align-center justify-center fill-height>
+              <v-flex>
+                <v-toolbar dense flat color="white">
+                  <v-toolbar-title class="title">
+                    Fill-in the metadata for the research collection: {{$store.state.metadataInputs.containerTitle}}
+               
+                  </v-toolbar-title>
+                  <v-spacer></v-spacer>
+                </v-toolbar>
+              </v-flex>
+            </v-layout>
+
+            <v-layout row>
+              <v-flex xs3>
+                <v-navigation-drawer permanent>
+                  <v-list>
+                    <v-item-group v-model="window">
+                      <v-item v-for="(c) in s[index].categories" :key="c.id">
+                        <div slot-scope="{ active, toggle }">
+                          <v-list-tile @click="toggle">
+                            <v-list-tile-content>{{c.question}}</v-list-tile-content>
+                          </v-list-tile>
+                        </div>
+                      </v-item>
+                    </v-item-group>
+                  </v-list>
+                </v-navigation-drawer>
+              </v-flex>
+              <v-flex xs12>
+                <v-window v-model="window" class="mx-0">
+                  <v-window-item v-for="(c) in s[index].categories" :key="c.id">
+                    <v-card-title class="title">{{c.description}}</v-card-title>
+
+                    <v-layout v-for="(f,index) in c.fields" :key="index">
+                  
+                      <v-flex v-if="f.component=='ext-service'&&f.visible==true">
+                        <ph-ext-service
+                          v-bind.sync="f"
+                          v-on:input-value="f.value=$event"
+                          v-on:add-textfield="changeFieldToText(c.fields, f)"
+                        ></ph-ext-service>
+                      </v-flex>
+
+                      <v-flex v-if="f.component == 'text-field'&&f.visible==true">
+                        <ph-text-field
+                          v-bind.sync="f"
+                          :multiplicable="true"
+                          v-on:input="f.value=$event"
+                          v-on:add="addField(c.fields, f)"
+                          v-on:remove="removeField(c.fields, f)"
+                        ></ph-text-field>
+                      </v-flex>
+
+                      <v-flex v-if=" f.component == 'selection'&&f.visible==true">
+                       
+                        <ph-selection
+                          v-bind.sync="f"
+                          :required="false"
+                          :field="[]"
+                          :commit="true"
+                          :freefield="f.freefield"
+                          :text="'skos:prefLabel'"
+                          :nested="['@value']"
+                          v-on:input-select="f.value=$event;updateSubfields(f.multiplicable,c.fields,f)"
+                          :freeText="{'@type': [f.type],'skos:prefLabel': [{'@value':''}]}"
+                        ></ph-selection>
+                      </v-flex>
+
+                      <v-layout
+                        row
+                        wrap
+                        v-if="f.visible==false&&$store.state.metadataInputs[f.category[0]]&&$store.state.metadataInputs[f.category[0]].indexOf(f.description)>=0"
+                      >
+                        <v-card-title
+                          v-if="f.category[0]=='biologicalMacromolecule'&&c.fields[index-1].description!=f.description"
+                          class="title"
+                        >{{f.description}}</v-card-title>
+                        <v-flex offset-xs2 xs10>
+                          <ph-ext-service
+                            v-if="f.component=='ext-service'"
+                            v-bind.sync="f"
+                            v-on:input-value="f.value=$event"
+                            v-on:add-textfield="changeFieldToText(c.fields, f)"
+                          ></ph-ext-service>
+
+                          <ph-text-field
+                            v-if="f.component=='text-field'"
+                            v-bind.sync="f"
+                            :multiplicable="true"
+                            v-on:input="f.value=$event"
+                            v-on:input-language="f.language=$event"
+                            v-on:add="addField(c.fields, f)"
+                            v-on:remove="removeField(c.fields, f)"
+                          ></ph-text-field>
+
+                          <ph-selection
+                            v-if="f.component=='selection'"
+                            v-bind.sync="f"
+                            :required="false"
+                            :field="[]"
+                            :commit="true"
+                            :freefield="true"
+                            :text="'skos:prefLabel'"
+                            :nested="['@value']"
+                            v-on:input-select="f.value=$event;updateSubfields(f.multiplicable,c.fields,f)"
+                            :freeText="{  '@type': [f.subjectType],
+          'skos:prefLabel': [{'@value':''}]}"
+                          ></ph-selection>
+                        </v-flex>
+                      </v-layout>
+                    </v-layout>
+                  </v-window-item>
+                </v-window>
+              </v-flex>
+            </v-layout>
+          </v-flex>
+          <v-flex v-else-if="n== 'submit'">
+              <v-layout align-center justify-center fill-height>
+              <v-flex>
+                <v-toolbar dense flat color="white">
+                  <v-toolbar-title class="title">
+                   Submit the following metadata:
+               
+                  </v-toolbar-title>
+                  <v-spacer></v-spacer>
+                </v-toolbar>
+              </v-flex>
+            </v-layout>
+
+              <ph-d-jsonld :form="form" :jsonld="jsonDisplay"></ph-d-jsonld>
+               <v-layout align-center justify-center fill-height>
+              <v-flex>
+                <v-toolbar dense flat color="white">
+                  <v-toolbar-title class="title">
+                   With the following files:
+               
+                  </v-toolbar-title>
+                  <v-spacer></v-spacer>
+                </v-toolbar>
+              </v-flex>
+            </v-layout>
+              <v-layout row wrap v-for="(mjson,index) in jsonDisplayMembers" :key="index+'files'">
+               
+              <v-flex xs12> 
+              
+                 
+        <v-icon>attachment</v-icon>
+       File {{index+1}}
+     </v-flex>
+              <v-flex xs12> <v-card>
+          <ph-d-jsonld :form="form" :jsonld="mjson"></ph-d-jsonld><v-spacer></v-spacer></v-card></v-flex></v-layout>
+            <v-layout align-center justify-end row class="ma-3">
+              <!--<v-dialog v-if="templating" v-model="templatedialog" width="500">
+                <v-btn
+                  class="mr-3"
+                  slot="activator"
+                  dark
+                  raised
+                  :loading="loading"
+                  :disabled="loading"
+                  color="grey"
+                >Save as template</v-btn>
+                <v-card>
+                  <v-card-title class="headline grey lighten-2" primary-title>
+                    <span v-t="'Save as template'"></span>
+                  </v-card-title>
+                  <v-card-text>
+                    <v-text-field v-model="templatename" :label="$t('Template name')"></v-text-field>
+                  </v-card-text>
+                  <v-card-actions>
+                    <v-spacer></v-spacer>
+                    <v-btn
+                      :loading="loading"
+                      :disabled="loading"
+                      color="grey"
+                      dark
+                      @click="templatedialog= false"
+                    >
+                      <span v-t="'Cancel'"></span>
+                    </v-btn>
+                    <v-btn :loading="loading" :disabled="loading" color="primary">
+                      <span v-t="'Save'"></span>
+                    </v-btn>
+                  </v-card-actions>
+                </v-card>
+              </v-dialog>-->
+              <v-btn
+                v-if="targetpid"
+                raised
+                :loading="loading"
+                :disabled="loading"
+                color="primary"
+                @click="save()"
+              >
+                <span v-t="'Save'"></span>
+              </v-btn>
+              <v-btn
+                v-else
+                raised
+                :loading="loading"
+                :disabled="loading"
+                color="primary"
+                @click="$emit('submit')"
+              >
+                <span v-t="'Submit'"></span>
+              </v-btn>
+            </v-layout>
+          </v-flex>
+        </v-stepper-content>
+      </v-stepper-items>
+    </v-stepper>
+  </v-container>
+</template>
+
+<script>
+import VueJsonPretty from "vue-json-pretty";
+import arrays from "@/utils/arrays";
+import jsonLd from "@/utils/json-ld";
+import fields from "@/utils/fields";
+import PhTextField from "./PhTextField";
+import PhTextFieldSuggest from "./PhTextFieldSuggest";
+import PhTitle from "./PhTitle";
+import PhEntity from "./PhEntity";
+import PhProject from "./PhProject";
+import PhExtService from "./PhExtService";
+import PhFiles from "./PhFiles";
+import PhSelection from "./PhSelection";
+import PhSelectionProj from "./PhSelectionProj";
+import PhAssaySelection from "./PhAssaySelection";
+import PhDate from "./PhDate";
+import PISelect from "./PISelect";
+import PhDJsonld from "@/components/display/pharma_display/PhDJsonld";
+
+export default {
+  name: "ph-input-form",
+  components: {
+    PhTextField,
+    PhTextFieldSuggest,
+    PhTitle,
+    PhEntity,
+    PhProject,
+    PhExtService,
+    PhFiles,
+    PhSelection,
+    PhSelectionProj,
+    PhDate,
+    PhAssaySelection,
+    PISelect,
+    PhDJsonld,
+    VueJsonPretty
+  },
+  props: {
+    form: {
+      type: Object,
+      default: {
+        sections: []
+      }
+    },
+    model: {
+      type: String,
+      default: "https://pid.phaidra.org/vocabulary/8MY0-BQDQ"
+    },
+    jsondata: {
+      type: Object
+    },
+    loading: {
+      type: Boolean,
+      default: false
+    },
+    templating: {
+      type: Boolean,
+      default: true
+    },
+    floatingsavebutton: {
+      type: Boolean,
+      default: false
+    },
+    targetpid: {
+      type: String
+    },
+    addbutton: {
+      type: Boolean,
+      default: true
+    }
+  },
+
+  computed: {
+    activeTabs: function() {
+      var sections = this.form.sections;
+
+      return sections.filter(function(section) {
+        return section.isActive;
+      });
+    },
+
+    sectionNumbers: function() {
+      return this.activeTabs.length;
+    },
+    /*  submittype: function() {
+      for (let s of this.form.sections) {
+        if (s.fields && s.type !== "member") {
+          for (let field of s.fields) {
+            if (field.predicate === "dcterms:type") {
+              return this.getObjectType(field.value);
+            }
+          }
+        }
+      }
+    },*/
+    filteredMetadatafields() {
+      let list = fields.getEditableFields();
+      if (this.searchfieldsinput) {
+        return list.filter(
+          f =>
+            f.fieldname
+              .toLowerCase()
+              .includes(this.searchfieldsinput.toLowerCase()) ||
+            f.definition
+              .toLowerCase()
+              .includes(this.searchfieldsinput.toLowerCase())
+        );
+      } else {
+        return list;
+      }
+    },
+    s: function() {
+      return this.form.sections;
+    },
+    jsonDisplay: function() {
+      if (this.jsondata.metadata) {
+        if (this.jsondata.metadata["json-ld"]) {
+          //get the object,
+
+          if (
+            this.jsondata.metadata["json-ld"][this.getObjectType(this.model)]
+          ) {
+            return this.jsondata.metadata["json-ld"][
+              this.getObjectType(this.model)
+            ];
+          }
+        }
+      }
+    },
+    jsonDisplayMembers: function() {
+      if (this.jsondata.metadata) {
+        if (this.jsondata.metadata["json-ld"]) {
+          let jsonmembersarray = new Array();
+          //check if there are member files
+          for (var f = 0; f < this.filesNber; f++) {
+            var fplus = f + 1;
+
+            if (this.jsondata.metadata["json-ld"]["member_" + fplus]) {
+              jsonmembersarray.push(
+                this.jsondata.metadata["json-ld"]["member_" + fplus]
+              );
+            }
+          }
+          return jsonmembersarray;
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      templatedialog: "",
+      templatename: "",
+      filesNber: 0,
+      window: 0,
+      stepper: 1,
+      stepsTitle: [
+        "General metadata",
+        "File",
+        "Content Classification",
+        "Submission"
+      ],
+      steps: ["general", "file", "content", "submit"]
+    };
+  },
+  methods: {
+    alert: function(e) {
+      console.log("alert", e);
+    },
+    getObjectType: function(contentmodel) {
+      switch (contentmodel) {
+        case "https://pid.phaidra.org/vocabulary/44TN-P1S0":
+          return "picture";
+        case "https://pid.phaidra.org/vocabulary/8YB5-1M0J":
+          return "audio";
+        case "https://pid.phaidra.org/vocabulary/B0Y6-GYT8":
+          return "video";
+        case "https://pid.phaidra.org/vocabulary/69ZZ-2KGX":
+          return "document";
+        case "https://pid.phaidra.org/vocabulary/8MY0-BQDQ":
+          return "container";
+        default:
+          return "unknown";
+      }
+    },
+
+    changeFieldToText: function(arr, f) {
+      var newField = arrays.duplicate(arr, f);
+      //console.log("newField", newField);
+      if (newField) {
+        newField.id = new Date().getTime();
+        newField.removable = true;
+        newField.component = "text-field";
+        newField.predicate = "dcterms:subject";
+        //newField.type = f.subjectType;
+        newField.removable = true;
+        if (newField.multiplicable) {
+          newField.multiplicable = true;
+        }
+
+        if (newField.value) {
+          newField.value = "";
+        }
+        if (newField.text) {
+          newField.text = "";
+        }
+        if (newField.ontClass) {
+          delete newField.ontClass;
+        }
+        if (newField.ontology) {
+          delete newField.ontology;
+        }
+        if (newField.topId) {
+          delete newField.topId;
+        }
+      }
+    },
+    addField: function(arr, f) {
+      var newField = arrays.duplicate(arr, f);
+
+      if (newField) {
+        newField.id = new Date().getTime();
+
+        newField.removable = true;
+
+        if (newField.value) {
+          newField.value = "";
+        }
+        if (newField.firstname) {
+          newField.firstname = "";
+        }
+        if (newField.lastname) {
+          newField.lastname = "";
+        }
+
+        if (newField.email) {
+          newField.email = "";
+        }
+        if (newField.orcid) {
+          newField.orcid = "";
+        }
+        if (newField.institution) {
+          newField.institution = [
+            { "@id": "univie", "skos:prefLabel": "University of Vienna" }
+          ];
+        }
+        if (newField.project) {
+          newField.project = [
+            {
+              "@type": "foaf:Project",
+              "skos:prefLabel": [
+                {
+                  "@value": "",
+                  "@language": "en"
+                }
+              ],
+              "rdfs:comment": [
+                {
+                  "@value": "",
+                  "@language": "eng"
+                }
+              ],
+              "foaf:homepage": [""],
+              "skos:notation": [""]
+            }
+          ];
+        }
+        if (newField.agency) {
+          newField.agency = [
+            {
+              "@type": "frapo:FundingAgency",
+              "skos:prefLabel": [
+                {
+                  "@value": "",
+                  "@language": "eng"
+                }
+              ],
+              "skos:exactMatch": [""]
+            }
+          ];
+        }
+      }
+    },
+    removeField: function(arr, f) {
+      arrays.remove(arr, f);
+    },
+    updateSubfields: function(mult, arr, el) {
+      //mult is to deal with the fact that we might want to allow those selection fields to be multipled
+      if (mult) {
+        var self = this;
+        var sub = [];
+
+        if (el.subcategory) {
+          sub = arr.filter(function(a) {
+            if (a.category) {
+              return a.category[0] === el.subcategory[0];
+            }
+          });
+        } else {
+          sub = arr.filter(function(a) {
+            if (a.category) {
+              return a.category[0] === el.category[0];
+            }
+          });
+        }
+
+        for (var a2 in sub) {
+          //empty the fields that are not selected
+          if (
+            self.$store.state.metadataInputs[el.category[0]].indexOf(
+              sub[a2].description
+            ) < 0 &&
+            sub[a2].description != "selection"
+          ) {
+            sub[a2].value = "";
+            sub[a2].text = "";
+            //and remove the value of the subfields, if there are some
+
+            if (sub[a2].subcategory) {
+              //this.$store.commit(sub[a2].stateVoc, []);
+              //then clear all the subcategories
+              for (var b in sub) {
+                //console.log("sub", sub[b], "subcat", sub[a2]);
+                if (sub[b].category[0] === sub[a2].subcategory[0]) {
+                  //it's a subcategory of what we selected
+                  //clear values and store
+
+                  sub[b].value = "";
+                  sub[b].text = "";
+                }
+              }
+            }
+          } else {
+          }
+        }
+        // } else {
+        //console.log("doing nothing");
+      }
+    },
+    /*sortFieldUp: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i - 1]) {
+        if (arr[i - 1].ordergroup === f.ordergroup) {
+          arrays.moveUp(arr, f);
+        }
+      }
+    },*/
+    /* sortFieldDown: function(arr, f) {
+      var i = arr.indexOf(f);
+      if (arr[i + 1]) {
+        if (arr[i + 1].ordergroup === f.ordergroup) {
+          arrays.moveDown(arr, f);
+        }
+      }
+    },*/
+    setSelected: function(f, property, event) {
+      //if (event) {
+      // console.log("setselected", property, f);
+      f[property] = event["@id"];
+      //}
+
+      this.$emit("form-input-" + f.component, f);
+    },
+    warning: function(section) {
+      console.log("in warning", section);
+      if (typeof section === "undefined") {
+        //console.log("undefined");
+      } else {
+        var w = false;
+        //console.log("section", section);
+        if (section.fields) {
+          var fields = section.fields;
+
+          for (var f in fields) {
+            //console.log("field w", fields[f]);
+            if (fields[f].warning === true) {
+              w = true;
+              //console.log("field", fields[f].label, "is missing");
+            }
+          }
+        } else if (section.categories) {
+          //console.log("cat", section.categories);
+          for (var c in section.categories) {
+            if (section.categories[c].fields) {
+              var fields = section.categories[c].fields;
+              for (var f in fields) {
+                if (fields[f].warning === true) {
+                  w = true;
+                  console.log("field", fields[f].label, "is missing");
+                }
+              }
+            }
+          }
+        }
+      }
+      return w;
+    },
+
+    selectInput: function(f, event) {
+      if (event) {
+        f.value = event["@id"];
+        if (event["@type"]) {
+          f.type = event["@type"];
+        }
+        var preflabels = event["skos:prefLabel"];
+        f["skos:prefLabel"] = [];
+        Object.entries(preflabels).forEach(([key, value]) => {
+          f["skos:prefLabel"].push({ "@value": value, "@language": key });
+        });
+        var rdfslabels = event["rdfs:label"];
+        if (rdfslabels) {
+          f["rdfs:label"] = [];
+          Object.entries(rdfslabels).forEach(([key, value]) => {
+            f["rdfs:label"].push({ "@value": value, "@language": key });
+          });
+        }
+        f["skos:notation"] = event["skos:notation"];
+      } else {
+        f.value = "";
+        f["skos:prefLabel"] = [];
+      }
+      this.$emit("form-input-" + f.component, f);
+    }
+  },
+  mounted: function() {
+    this.$store.dispatch("loadLanguages");
+  }
+};
+</script>
+
+<style scoped>
+.v-btn {
+  margin: 0;
+}
+.container {
+  padding: 0 !important;
+}
+.pharma-form .v-label {
+  color: rgba(0, 0, 0, 0.8) !important;
+}
+</style>
diff --git a/src/components/input/pharma-input-fields/PhProject.vue b/src/components/input/pharma-input-fields/PhProject.vue
index e96fcca6b27c79d5a12cec0182bace4a83c5eaec..957867bcc96d18e164fcfcbc93a00d21c91b594f 100644
--- a/src/components/input/pharma-input-fields/PhProject.vue
+++ b/src/components/input/pharma-input-fields/PhProject.vue
@@ -35,7 +35,7 @@
                     :multiplicable="false"
                     :required="true"
                     :default="{'@type': 'foaf:Project','skos:prefLabel': [{'@value': '','@language': 'en'}],'rdfs:comment': [{'@value': '','@language': 'eng'}],'foaf:homepage': [''],'skos:notation': ['']}"
-                    :freeField="true"
+                    :freefield="true"
                     v-on:input-changedType="readonly=$event"
                     v-on:input-select="$emit('input-project',$event);validate(), $emit('validation', validationWarning)"
                   ></ph-selection-proj>
@@ -49,7 +49,7 @@
                     :multiplicable="false"
                     :multiline="true"
                     :required="false"
-                    :freeField="!readonly"
+                    :freefield="!readonly"
                     v-on:input-select="$emit('input-project', proj)"
                   ></ph-textselected>
                 </v-flex>
@@ -61,7 +61,7 @@
                     :label="$t('Project homepage')"
                     :multiplicable="false"
                     :required="false"
-                    :freeField="!readonly"
+                    :freefield="!readonly"
                     v-on:input-select="$emit('input-project', proj)"
                   ></ph-textselected>
                 </v-flex>
@@ -74,7 +74,7 @@
                     :label="$t('Project ID')"
                     :multiplicable="false"
                     :required="false"
-                    :freeField="!readonly"
+                    :freefield="!readonly"
                     v-on:input-select="$emit('input-project',proj);"
                   ></ph-textselected>
                 </v-flex>
@@ -90,7 +90,7 @@
                     :multiplicable="false"
                     :required="true"
                     :default="{'@type': 'frapo:FundingAgency','skos:prefLabel': [{'@value': ''}],'skos:exactMatch': ['']}"
-                    :freeField="true"
+                    :freefield="true"
                     v-on:input-changedType="readonlyAg=$event"
                     v-on:input-select="$emit('input-agency',$event);validate(), $emit('validation', validationWarning)"
                   ></ph-selection-proj>
@@ -103,7 +103,7 @@
                     :label="$t('Funding agency ID')"
                     :multiplicable="false"
                     :required="false"
-                    :freeField="!readonlyAg"
+                    :freefield="!readonlyAg"
                     v-on:input-select="$emit('input-agency',ag);"
                   ></ph-textselected>
                 </v-flex>
diff --git a/src/components/input/pharma-input-fields/PhSelect.vue b/src/components/input/pharma-input-fields/PhSelect.vue
index fcf92f405345297e3714566eec9148f18dfa3176..eaf8a39b4f9271aed79282cb1b4175aadc0f601a 100644
--- a/src/components/input/pharma-input-fields/PhSelect.vue
+++ b/src/components/input/pharma-input-fields/PhSelect.vue
@@ -40,7 +40,7 @@
               </v-flex>
               <!-- do we even need this freefield if , we are in the selct section...?-->
 
-              <v-flex v-if="freeField">
+              <v-flex v-if="freefield">
                 <v-tooltip bottom>
                   <v-btn
                     slot="activator"
@@ -179,7 +179,7 @@ export default {
     freeText: {
       type: Object
     },
-    freeField: {
+    freefield: {
       type: Boolean
     },
     info: {
diff --git a/src/components/input/pharma-input-fields/PhSelection.vue b/src/components/input/pharma-input-fields/PhSelection.vue
index 73605e5a02b051cef6c7f4899b8b46521c330098..166e626d6f05e323212f74ba658c75e4337e789c 100644
--- a/src/components/input/pharma-input-fields/PhSelection.vue
+++ b/src/components/input/pharma-input-fields/PhSelection.vue
@@ -1,6 +1,8 @@
 <template>
   <v-layout row wrap>
+   
     <v-flex xs6 v-if="multiplicable">
+     
       <v-autocomplete
         v-model="fieldArray"
         :label="label"
@@ -143,7 +145,7 @@ export default {
     freeText: {
       type: Object
     },
-    freeField: {
+    freefield: {
       type: Boolean
     },
     info: {
@@ -299,6 +301,7 @@ export default {
           //  }
           //} else {
           this.$store.commit(para, val);
+
           //}
         }
       }
diff --git a/src/components/input/pharma-input-fields/PhSelectionProj.vue b/src/components/input/pharma-input-fields/PhSelectionProj.vue
index d3fa9b641cde99299bc6988ece91e7c8207deeef..617b94144c5c57b0d0569710d8e5515f2ccd960d 100644
--- a/src/components/input/pharma-input-fields/PhSelectionProj.vue
+++ b/src/components/input/pharma-input-fields/PhSelectionProj.vue
@@ -40,7 +40,7 @@
               </v-flex>
               <!-- do we even need this freefield if , we are in the selct section...?-->
 
-              <v-flex v-if="freeField">
+              <v-flex v-if="freefield">
                 <v-tooltip bottom>
                   <v-btn
                     slot="activator"
@@ -179,7 +179,7 @@ export default {
     freeText: {
       type: Object
     },
-    freeField: {
+    freefield: {
       type: Boolean
     },
     info: {
diff --git a/src/components/input/pharma-input-fields/PhTextselected.vue b/src/components/input/pharma-input-fields/PhTextselected.vue
index 25680dd55e84defc20b92ccaf2ae35b87a009cd0..6fb77a20aab78b1c6c959377b9ee46d41301f220 100644
--- a/src/components/input/pharma-input-fields/PhTextselected.vue
+++ b/src/components/input/pharma-input-fields/PhTextselected.vue
@@ -2,7 +2,7 @@
   <v-layout row wrap>
     <v-flex v-for="(i,index) in fieldArray" :key="index" xs12>
       <v-toolbar v-if="!multiline" flat color="white">
-        <v-flex v-if="!freeField" xs10>
+        <v-flex v-if="!freefield" xs10>
           <v-text-field
             :label="label"
             :value="parseOutput(i)"
@@ -14,7 +14,7 @@
             readonly
           ></v-text-field>
         </v-flex>
-        <v-flex v-if="freeField" xs10>
+        <v-flex v-if="freefield" xs10>
           <v-text-field
             v-model="textValue[index]"
             :label="label"
@@ -51,7 +51,7 @@
       </v-toolbar>
 
       <v-toolbar class="py-5" v-if="multiline" flat color="white">
-        <v-flex v-if="!freeField" xs10>
+        <v-flex v-if="!freefield" xs10>
           <v-textarea
             box
             background-color="white"
@@ -63,7 +63,7 @@
             auto-grow
           ></v-textarea>
         </v-flex>
-        <v-flex v-if="freeField" xs10>
+        <v-flex v-if="freefield" xs10>
           <v-textarea
             box
             background-color="white"
@@ -135,7 +135,7 @@ export default {
     required: {
       type: Boolean
     },
-    freeField: {
+    freefield: {
       type: Boolean
     }
   },
diff --git a/src/components/select/CollectionDialog.vue b/src/components/select/CollectionDialog.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0697890bfe1f77e85fc929ecfc16cbf2425b9d1b
--- /dev/null
+++ b/src/components/select/CollectionDialog.vue
@@ -0,0 +1,116 @@
+<template>
+  <v-dialog v-model="dialog" width="700px">
+    <v-card>
+      <v-card-title class="grey white--text">{{ $t('Select a collection') }}</v-card-title>
+      <v-card-text>
+        <v-text-field
+          v-model="collectionsSearch"
+          append-icon="search"
+          :label="$t('Search...')"
+          single-line
+          hide-details
+          class="mb-4"
+        ></v-text-field>
+        <v-data-table
+          hide-default-header
+          :headers="collectionsHeaders"
+          :items="collections"
+          :search="collectionsSearch"
+          :custom-filter="filterTitle"
+          :loading="loading"
+          :loading-text="$t('Loading...')"
+          :items-per-page="5"
+        >
+          <template v-slot:item.title="{ item }">
+            <span v-if="item.dc_title">{{ item.dc_title[0] | truncate(50) }}</span>
+          </template>
+          <template v-slot:item.created="{ item }">
+            {{ item.created | date }}
+          </template>
+          <template v-slot:item.actions="{ item }">
+            <v-btn text color="primary" @click="selectCollection(item)">{{ $t('Select') }}</v-btn>
+          </template>
+        </v-data-table>
+      </v-card-text>
+      <v-divider></v-divider>
+      <v-card-actions>
+        <v-container>
+          <v-row justify="end" class="px-4">
+            <v-btn color="grey" dark @click="dialog = false">{{ $t('Cancel') }}</v-btn>
+          </v-row>
+        </v-container>
+      </v-card-actions>
+    </v-card>
+  </v-dialog>
+</template>
+
+<script>
+export default {
+  name: 'collection-dialog',
+  computed: {
+    instance: function () {
+      return this.$store.state.instanceconfig
+    }
+  },
+  data () {
+    return {
+      dialog: false,
+      loading: false,
+      collectionsSearch: '',
+      collectionsHeaders: [
+        { text: 'Pid', align: 'left', value: 'pid' },
+        { text: 'Title', align: 'left', value: 'title' },
+        { text: 'Created', align: 'right', value: 'created' },
+        { text: 'Actions', align: 'right', value: 'actions', sortable: false }
+      ],
+      collections: []
+    }
+  },
+  methods: {
+    filterTitle (value, search, item) {
+      if (item.dc_title) {
+        if (item.dc_title.length > 0) {
+          return item.dc_title[0].indexOf(search) !== -1
+        } else {
+          return false
+        }
+      } else {
+        return false
+      }
+    },
+    open: async function () {
+      this.dialog = true
+      this.loading = true
+      let params = {
+        q: '*:*',
+        defType: 'edismax',
+        wt: 'json',
+        start: 0,
+        rows: 1000,
+        sort: 'created desc',
+        fq: [ 'resourcetype:collection', 'owner:' + this.$store.state.user.username ]
+      }
+      try {
+        let response = await this.$http.request({
+          method: 'POST',
+          url: this.instance.solr + '/select',
+          headers: {
+            'X-XSRF-TOKEN': this.$store.state.user.token
+          },
+          params: params
+        })
+        this.collections = response.data.response.docs
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      } finally {
+        this.loading = false
+      }
+    },
+    selectCollection: function (item) {
+      this.$emit('collection-selected', item)
+      this.dialog = false
+    }
+  }
+}
+</script>
diff --git a/src/components/select/ListDialog.vue b/src/components/select/ListDialog.vue
new file mode 100644
index 0000000000000000000000000000000000000000..97ae7ca679e430bb427c862226c67b6abd6e7092
--- /dev/null
+++ b/src/components/select/ListDialog.vue
@@ -0,0 +1,102 @@
+<template>
+  <v-dialog v-model="dialog" width="700px">
+    <v-card>
+      <v-card-title class="grey white--text">{{ $t('Select a list') }}</v-card-title>
+      <v-card-text>
+        <v-text-field
+          v-model="listsSearch"
+          append-icon="search"
+          :label="$t('Search...')"
+          single-line
+          hide-details
+          class="mb-4"
+        ></v-text-field>
+        <v-data-table
+          hide-default-header
+          :headers="listsHeaders"
+          :items="lists"
+          :search="listsSearch"
+          :loading="loading"
+          :loading-text="$t('Loading...')"
+          :items-per-page="5"
+        >
+          <template v-slot:item.name="{ item }">
+            <v-tooltip bottom>
+              <template v-slot:activator="{ on }">
+                <span v-on="on">{{ item.name | truncate(50) }}</span>
+              </template>
+              <span>{{ item.listid }}</span>
+            </v-tooltip>
+          </template>
+          <template v-slot:item.created="{ item }">
+            {{ item.created | unixtime }}
+          </template>
+          <template v-slot:item.updated="{ item }">
+            {{ item.updated | unixtime }}
+          </template>
+          <template v-slot:item.actions="{ item }">
+            <v-btn text color="primary" @click="selectList(item)">{{ $t('Select') }}</v-btn>
+          </template>
+        </v-data-table>
+      </v-card-text>
+      <v-divider></v-divider>
+      <v-card-actions>
+        <v-container>
+          <v-row justify="end" class="px-4">
+            <v-btn color="grey" dark @click="dialog = false">{{ $t('Cancel') }}</v-btn>
+          </v-row>
+        </v-container>
+      </v-card-actions>
+    </v-card>
+  </v-dialog>
+</template>
+
+<script>
+export default {
+  name: 'list-dialog',
+  computed: {
+    instance: function () {
+      return this.$store.state.instanceconfig
+    }
+  },
+  data () {
+    return {
+      dialog: false,
+      loading: false,
+      listsSearch: '',
+      listsHeaders: [
+        { text: 'Name', align: 'left', value: 'name' },
+        { text: 'Created', align: 'right', value: 'created' },
+        { text: 'Updated', align: 'right', value: 'updated' },
+        { text: 'Actions', align: 'right', value: 'actions', sortable: false }
+      ],
+      lists: []
+    }
+  },
+  methods: {
+    open: async function () {
+      this.dialog = true
+      this.loading = true
+      try {
+        let response = await this.$http.request({
+          method: 'GET',
+          url: this.instance.api + '/lists',
+          headers: {
+            'X-XSRF-TOKEN': this.$store.state.user.token
+          }
+        })
+        this.lists = response.data.lists
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      } finally {
+        this.loading = false
+      }
+    },
+    selectList: function (item) {
+      this.$emit('list-selected', item)
+      this.dialog = false
+    }
+  }
+}
+</script>
diff --git a/src/components/select/OrgUnitsTreeDialog.vue b/src/components/select/OrgUnitsTreeDialog.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a3ba47a001591d47ee5863a692c2643998f2f815
--- /dev/null
+++ b/src/components/select/OrgUnitsTreeDialog.vue
@@ -0,0 +1,77 @@
+<template>
+  <v-dialog v-model="dialog" width="700px">
+    <v-card :loading="loading">
+      <v-card-title class="grey white--text">{{ $t('Select an organizational unit') }}</v-card-title>
+      <v-card-text>
+        <v-treeview :items="orgunits" item-children="subunits" item-key="@id" hoverable activatable @update:active="selectUnit($event)"></v-treeview>
+      </v-card-text>
+      <v-divider></v-divider>
+      <v-card-actions>
+        <v-container>
+          <v-row justify="end" class="px-4">
+            <v-btn color="grey" dark @click="dialog = false">{{ $t('Cancel') }}</v-btn>
+          </v-row>
+        </v-container>
+      </v-card-actions>
+    </v-card>
+  </v-dialog>
+</template>
+
+<script>
+export default {
+  name: 'org-units-tree-dialog',
+  computed: {
+    instance: function () {
+      return this.$store.state.instanceconfig
+    }
+  },
+  data () {
+    return {
+      dialog: false,
+      loading: false,
+      orgunits: []
+    }
+  },
+  methods: {
+    open: async function () {
+      this.dialog = true
+      this.loading = true
+      try {
+        let response = await this.$http.request({
+          method: 'GET',
+          url: this.$store.state.instanceconfig.api + '/directory/org_get_units',
+          headers: {
+            'X-XSRF-TOKEN': this.$store.state.user.token
+          }
+        })
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit('setAlerts', response.data.alerts)
+        }
+        this.orgunits = response.data.units
+        this.addNames(this.orgunits)
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      } finally {
+        this.loading = false
+      }
+    },
+    addNames: function (units) {
+      for (let u of units) {
+        if (u['skos:prefLabel']) {
+          u['name'] = u['skos:prefLabel'][this.$i18n.locale]
+        }
+        if (u['subunits']) {
+          if (u.subunits.length > 0) {
+            this.addNames(u.subunits)
+          }
+        }
+      }
+    },
+    selectUnit: function (item) {
+      this.$emit('unit-selected', item[0])
+      this.dialog = false
+    }
+  }
+}
+</script>
diff --git a/src/components/templates/PTemplates.vue b/src/components/templates/PTemplates.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5f5d7898ae5c1595bd0caf09d8a03ada50ea65d2
--- /dev/null
+++ b/src/components/templates/PTemplates.vue
@@ -0,0 +1,123 @@
+<template>
+
+  <v-data-table
+    :headers="headers"
+    :items="templates"
+    :loading="loading"
+    class="elevation-1"
+  >
+    <template v-slot:item.name="{ item }">
+      <v-tooltip bottom>
+        <template v-slot:activator="{ on }">
+          <span v-on="on">{{ item.name }}</span>
+        </template>
+        <span>{{ item.tid }}</span>
+      </v-tooltip>
+    </template>
+    <template v-slot:item.created="{ item }">
+      {{ item.created | unixtime }}
+    </template>
+    <template v-slot:item.load="{ item }">
+      <v-btn text color="primary" @click="loadTemplate(item.tid)">{{ $t('Load') }}</v-btn>
+      <v-btn text color="grey" @click="deleteTemplate(item.tid)">{{ $t('Delete') }}</v-btn>
+    </template>
+  </v-data-table>
+
+</template>
+
+<script>
+export default {
+  name: 'p-templates',
+  props: {
+    tag: {
+      type: String
+    }
+  },
+  data () {
+    return {
+      headers: [
+        { text: 'Name', align: 'left', value: 'name' },
+        { text: 'Created', align: 'right', value: 'created' },
+        { text: 'Actions', align: 'right', value: 'load', sortable: false }
+      ],
+      templates: [],
+      deletetempconfirm: false,
+      loading: false
+    }
+  },
+  methods: {
+    loadTemplate: async function (tid) {
+      this.loading = true
+      try {
+        let response = await this.$http.request({
+          method: 'GET',
+          url: this.$store.state.instanceconfig.api + '/jsonld/template/' + tid,
+          headers: {
+            'X-XSRF-TOKEN': this.$store.state.user.token
+          }
+        })
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit('setAlerts', response.data.alerts)
+        }
+        this.$emit('load-template', response.data.template.form)
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      } finally {
+        this.loading = false
+      }
+    },
+    deleteTemplate: async function (tid) {
+      if (confirm(this.$t('Are you sure you want to delete this template?'))) {
+        this.loading = true
+        try {
+          let response = await this.$http.request({
+            method: 'GET',
+            url: this.$store.state.instanceconfig.api + '/jsonld/template/' + tid + '/remove',
+            headers: {
+              'X-XSRF-TOKEN': this.$store.state.user.token
+            }
+          })
+          if (response.data.alerts && response.data.alerts.length > 0) {
+            this.$store.commit('setAlerts', response.data.alerts)
+          }
+          this.deletetempconfirm = false
+          this.loadTemplates()
+        } catch (error) {
+          console.log(error)
+          this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+        } finally {
+          this.loading = false
+        }
+      }
+    },
+    loadTemplates: async function () {
+      this.loading = true
+      try {
+        let response = await this.$http.request({
+          method: 'GET',
+          url: this.$store.state.instanceconfig.api + '/jsonld/templates' + ((this.tag && this.tag.length > 1) ? '?tag=' + this.tag : ''),
+          headers: {
+            'X-XSRF-TOKEN': this.$store.state.user.token
+          }
+        })
+        if (response.data.alerts && response.data.alerts.length > 0) {
+          this.$store.commit('setAlerts', response.data.alerts)
+        }
+        this.templates = response.data.templates
+        this.loading = false
+      } catch (error) {
+        console.log(error)
+        this.$store.commit('setAlerts', [{ type: 'danger', msg: error }])
+      } finally {
+        this.loading = false
+      }
+    }
+  },
+  mounted: function () {
+    if (this.$store.state.user.token) {
+      this.loadTemplates()
+    }
+  }
+}
+</script>
\ No newline at end of file
diff --git a/src/i18n/eng.js b/src/i18n/eng.js
index 6bd79fe4934844a5eab1606412c01ed7d4f564bd..05f8c52636c6811998022eaca9c2bd7b474f2cd8 100644
--- a/src/i18n/eng.js
+++ b/src/i18n/eng.js
@@ -13,8 +13,7 @@ export default {
   "less 10MB": "< 10MB",
   "more 1GB": "> 1GB",
   SEARCH_PLACEHOLDER: "Search",
-  PHAIDRA_IS:
-    "Phaidra is the repository for the permanent secure storage of digital assets at the University of Vienna.",
+  PHAIDRA_IS: "Phaidra is the repository for the permanent secure storage of digital assets at the University of Vienna.",
   Search: "Search",
   Edit: "Edit",
   Delete: "Remove",
@@ -23,7 +22,7 @@ export default {
   "Metadata editor": "Metadata editor",
   "Metadata preview": "Metadata preview",
   Templates: "Templates",
-
+  Technique: "Technique",
   "bf:ParallelTitle": "Parallel title",
 
   "bf:Note": "Description",
@@ -97,11 +96,9 @@ export default {
   "vra:material": "Material",
   "vra:hasInscription": "Inscription",
 
-  MEMBERS_DELETE_ALERT_CONTAINER:
-    "This object is a Container with {nrmembers} members. Only an empty Container can be deleted. If you want to delete this object, you need to remove all members from this Container or delete them first.",
+  MEMBERS_DELETE_ALERT_CONTAINER: "This object is a Container with {nrmembers} members. Only an empty Container can be deleted. If you want to delete this object, you need to remove all members from this Container or delete them first.",
   DELETE_OBJECT: "Here you can delete object {pid}.",
-  DELETE_OBJECT_CONFIRM:
-    "Are you sure you want to permanently delete object {pid}?",
+  DELETE_OBJECT_CONFIRM: "Are you sure you want to permanently delete object {pid}?",
 
   ORG_PUBLISHER: "Publisher",
 
@@ -206,8 +203,7 @@ export default {
   uwm_educational_educationals_enduserrole: "Intended End User Role",
   uwm_educational_educationals_interactivitylevel: "Interactivity Level",
   uwm_educational_educationals_interactivitytype: "Interactivity Type",
-  uwm_educational_educationals_learningresourcetype:
-    "Type of Teaching and Educational Resource",
+  uwm_educational_educationals_learningresourcetype: "Type of Teaching and Educational Resource",
   uwm_technical: "Technical Data",
   uwm_technical_duration: "Duration",
   uwm_technical_otherrequirements: "Requirements for the Use of the Object",
@@ -449,4 +445,4 @@ export default {
   lang_za: "Zhuang",
   lang_zh: "Chinese",
   lang_zu: "Zulu"
-};
+};
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 0bca5f4a68e5ff8aa9c22a0ed01227cedb1a3a6a..8ab6ef1989bf8aa13170a638e112f164a0a22949 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,6 +9,7 @@ import deu from "./i18n/deu";
 import ita from "./i18n/ita";
 import App from "./App.vue";
 import moment from "moment";
+import axios from 'axios';
 
 Vue.config.productionTip = false;
 
@@ -23,19 +24,23 @@ Vue.use(SvgIcon, {
   defaultHeight: "1em"
 });
 
-Vue.filter("unixtime", function(value) {
+Vue.filter("unixtime", function (value) {
   if (value) {
     return moment.unix(String(value)).format("DD.MM.YYYY hh:mm:ss");
   }
 });
 
-Vue.filter("date", function(value) {
+Vue.filter("date", function (value) {
   if (value) {
     return moment(String(value)).format("DD.MM.YYYY");
   }
 });
 
-const messages = { eng, deu, ita };
+const messages = {
+  eng,
+  deu,
+  ita
+};
 const i18n = new VueI18n({
   locale: "eng",
   fallbackLocale: "deu",
@@ -45,20 +50,20 @@ const i18n = new VueI18n({
 });
 
 const router = new VueRouter({
-  routes: [
-    {
-      name: "detail",
-      path: "/details",
-      component: {
-        template: "<div><b>Details</b> not implemented in PVC demo app</div>"
-      }
+  routes: [{
+    name: "detail",
+    path: "/details",
+    component: {
+      template: "<div><b>Details</b> not implemented in PVC demo app</div>"
     }
-  ]
+  }]
 });
 
+Vue.prototype.$http = axios
+
 new Vue({
   store,
   i18n,
   router,
   render: h => h(App)
-}).$mount("#app");
+}).$mount("#app");
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index 4f19b4c74b31f978d00a476a24b60ed03d24edb5..bc03796114ebd1440ac5ddbb3e13523198254982 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -2,7 +2,6 @@ import Vue from "vue";
 import Vuex from "vuex";
 import vocabulary from "./modules/vocabulary";
 import metadataInputs from "./modules/metadataInputs";
-import vocabularyPharma from "./modules/vocabularyPharma";
 
 Vue.use(Vuex);
 
@@ -167,8 +166,7 @@ export default new Vuex.Store({
   },
   modules: {
     vocabulary,
-    metadataInputs,
-    vocabularyPharma
+    metadataInputs
   },
   strict: debug
 });
diff --git a/src/store/modules/vocabulary.js b/src/store/modules/vocabulary.js
index 819dcb868dfe6eb0db29140235d9eae321e8c0d7..a057247ab8815dfcce3eb64fe61bb65dc0488b04 100644
--- a/src/store/modules/vocabulary.js
+++ b/src/store/modules/vocabulary.js
@@ -180,7 +180,7 @@ const state = {
     bioassay_type: {
       terms: [
         {
-          "@type": "assay_type",
+          "@type": "pharmaWien:assayType",
           "skos:prefLabel": [
             {
               "@value": "ADMET",
@@ -190,7 +190,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000009"]
         },
         {
-          "@type": "assay_type",
+          "@type": "pharmaWien:assayType",
           "skos:prefLabel": [
             {
               "@value": "Binding type",
@@ -200,7 +200,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000041"]
         },
         {
-          "@type": "assay_type",
+          "@type": "pharmaWien:assayType",
           "skos:prefLabel": [
             {
               "@value": "Functional",
@@ -210,7 +210,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000010"]
         },
         {
-          "@type": "assay_type",
+          "@type": "pharmaWien:assayType",
           "skos:prefLabel": [
             {
               "@value": "Physicochemical",
@@ -220,7 +220,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0002810"]
         },
         {
-          "@type": "assay_type",
+          "@type": "pharmaWien:assayType",
           "skos:prefLabel": [
             {
               "@value": "Phenotype characterization",
@@ -235,7 +235,7 @@ const state = {
     anatomical_category: {
       terms: [
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:anatomicalCategory",
           "skos:prefLabel": [
             {
               "@value": "Anatomical entity, cross species",
@@ -245,28 +245,28 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/UBERON_0001062"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:anatomicalCategory",
           "skos:prefLabel": [
             { "@value": "Plant anatomical entity", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/PO_0025131"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:anatomicalCategory",
           "skos:prefLabel": [
             { "@value": "Anatomical entity, fungi", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/FAO_0000001"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:anatomicalCategory",
           "skos:prefLabel": [
             { "@value": "Anatomical entity, bacteria", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/OMIT_0026581"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:anatomicalCategory",
           "skos:prefLabel": [
             { "@value": "Viral structures", "@language": "eng" }
           ],
@@ -278,14 +278,14 @@ const state = {
     life: {
       terms: [
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:livingOrg",
           "skos:prefLabel": [
             { "@value": "Living Organisms", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_1"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:livingOrg",
           "skos:prefLabel": [
             { "@value": "Cellosaurus cell-line", "@language": "eng" }
           ],
@@ -297,40 +297,40 @@ const state = {
     biological_macromolecule: {
       terms: [
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [{ "@value": "Protein", "@language": "eng" }],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C17021"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [{ "@value": "Gene", "@language": "eng" }],
           "skos:exactMatch": [
             "http://www.bioassayontology.org/bao#BAO_0000582 "
           ]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [
             { "@value": "Polynucleotide", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/CHEBI_15986"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [
             { "@value": "Protein Family", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C20130"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [
             { "@value": "Protein Subunit", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [
             { "@value": "Protein Complex", "@language": "eng" }
           ],
@@ -338,14 +338,14 @@ const state = {
         },
 
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [
             { "@value": "Polysaccharide", "@language": "eng" }
           ],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/CHEBI:18154"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:biologicalMacromolecule",
           "skos:prefLabel": [{ "@value": "Lipid", "@language": "eng" }],
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/CHEBI:18059"]
         }
@@ -356,7 +356,7 @@ const state = {
     assay_target: {
       terms: [
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Protein",
@@ -366,7 +366,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C17021"]
         },
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Gene",
@@ -376,7 +376,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000582"]
         },
         {
-          "@type": "sAssay Target: kos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Nucleic Acid",
@@ -387,7 +387,7 @@ const state = {
         },
 
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Protein Family",
@@ -397,7 +397,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C20130"]
         },
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Protein Subunit",
@@ -407,7 +407,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0002555"]
         },
         {
-          "@type": "Assay Target:skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Protein Complex",
@@ -418,7 +418,7 @@ const state = {
         },
 
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Carbohydrate",
@@ -429,7 +429,7 @@ const state = {
         },
 
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Lipid",
@@ -440,7 +440,7 @@ const state = {
         },
 
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Small Molecule",
@@ -450,7 +450,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C48809"]
         },
         {
-          "@type": "organism_assay_target",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Organism",
@@ -460,7 +460,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCIT_C14250"]
         },
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Cultured Cell (cellosaurus)",
@@ -470,7 +470,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/CL_0000010"]
         },
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Cellular anatomical entity",
@@ -481,7 +481,7 @@ const state = {
         },
 
         {
-          "@type": "Assay Target: skos:Concept",
+          "@type": "pharmaWien:assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Tissue",
@@ -497,7 +497,7 @@ const state = {
     assay_organism: {
       terms: [
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:assayOrg",
           "skos:prefLabel": [
             {
               "@value": "Cellular organism",
@@ -507,7 +507,7 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_131567"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:assayOrg",
           "skos:prefLabel": [
             {
               "@value": "Viruses",
@@ -517,7 +517,42 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_10239"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:assayOrg",
+          "skos:prefLabel": [
+            {
+              "@value": "Viroids",
+              "@language": "eng"
+            }
+          ],
+          "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_12884"]
+        }
+      ],
+      loaded: true
+    },
+    assayTarget_organism: {
+      terms: [
+        {
+          "@type": "pharmaWien:assayOrg_assayTarget",
+          "skos:prefLabel": [
+            {
+              "@value": "Cellular organism",
+              "@language": "eng"
+            }
+          ],
+          "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_131567"]
+        },
+        {
+          "@type": "pharmaWien:assayOrg_assayTarget",
+          "skos:prefLabel": [
+            {
+              "@value": "Viruses",
+              "@language": "eng"
+            }
+          ],
+          "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_10239"]
+        },
+        {
+          "@type": "pharmaWien:assayOrg_assayTarget",
           "skos:prefLabel": [
             {
               "@value": "Viroids",
@@ -527,13 +562,12 @@ const state = {
           "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_12884"]
         }
       ],
-
       loaded: true
     },
     assay_detection: {
       terms: [
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:assayDetection",
           "skos:prefLabel": [
             {
               "@value": "Physical detection method",
@@ -543,7 +577,7 @@ const state = {
           "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000035"]
         },
         {
-          "@type": "skos:Concept",
+          "@type": "pharmaWien:assayDetection",
           "skos:prefLabel": [
             {
               "@value": "Detection instrument",
diff --git a/src/store/modules/vocabularyPharma.js b/src/store/modules/vocabularyPharma.js
deleted file mode 100644
index bd45da0d597afbdc5c91ab9ed36e6de653328c96..0000000000000000000000000000000000000000
--- a/src/store/modules/vocabularyPharma.js
+++ /dev/null
@@ -1,609 +0,0 @@
-import languages from "@/utils/lang";
-
-const state = {
-  vocabularies: {
-    institution: {
-      terms: [
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "University of Vienna"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Technical University of Vienna"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Austrian Institute of Technology"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "University of Stockholm"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "University of Graz"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Queen Mary, University of London"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Imperial College, London"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Perimeter Institute, Waterloo, Canada"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "University of Waterloo, Canada"
-            }
-          ]
-        },
-        {
-          "@type": "schema:Organization",
-          "schema:name": [
-            {
-              "@value": "Please give me unis you want to see listed"
-            }
-          ]
-        }
-      ],
-      loaded: true
-    },
-    //project ld is of type:
-    /*
-    "frapo:isOutputOf": [
-    {
-      "@type": "foaf:Project",
-      "skos:prefLabel": [
-        {
-          "@value": "Vom Vorbild zum Abbild",
-          "@language": "deu"
-        }
-      ],
-      "rdfs:comment": [
-        {
-          "@value": "From Object to Icon is an interdisciplinary research project, conducted at the Institute of Egyptology in cooperation with the research group Multimedia Information Systems at the University of Vienna. It is based on the research that was initiated with the project MeKeTRE.",
-          "@language": "eng"
-        }
-      ],
-      "foaf:homepage": [
-        "http://meketre.org/"
-      ],
-      "skos:notation": [
-        "P25958"
-      ]
-    }
-  ]
-  */
-    //funder ld is of type:
-    /*
- "frapo:hasFundingAgency": [
-    {
-      "@type": "frapo:FundingAgency",
-      "skos:prefLabel": {
-        "@value": "Austrian Science Fund",
-        "@language": "eng"
-      },
-      "skos:exactMatch": [
-        "http://dx.doi.org/10.13039/501100002428"
-      ]
-    }
-  ]
-    */
-    // how to make a simplified project oblject?
-    /*
-    vocabularies[voc].terms is my items
-
-    data.item["frapo:isOutputOf"][0]["skos:prefLabel"][0][ "@value"] gives me project title 
-    data.item["frapo:isOutputOf"][0]["rdfs:comment"][0][ "@value"] gives me project description
-    data.item["frapo:isOutputOf"][0]["foaf:homepage"][0] gives me project homepage
-    data.item["frapo:isOutputOf"][0]["skos:notation"][0] gives me project id/notation
-     data.item["frapo:hasFundingAgency"][0]["skos:prefLabel"]["@value"] gives me funding agency
-      data.item["frapo:hasFundingAgency"][0]["skos:exactMatch"][0] gives me funding agency iri/doi
-     
-    */
-    project: {
-      terms: [
-        {
-          "frapo:isOutputOf": [
-            {
-              "@type": "foaf:Project",
-              "skos:prefLabel": [
-                {
-                  "@value": "FAIRness for Life Science Data in Austria",
-                  "@language": "en"
-                }
-              ],
-              "rdfs:comment": [
-                {
-                  "@value":
-                    "Management, integration, and reuse of research data are key for innovation and creation of new knowledge. Although we have numerous data sources such as ChEMBL, PubChem, UniProt, and the Protein Data Bank available in the public domain, most of the data created in publicly funded research projects end up in pdf-based supplementary files of publications. At best they are additionally deposited in University repositories such as PHAIDRA, or on the web-site of the principal investigator. Although in principle public, they are quite hidden and not directly accessible for search machines. In order to push the demand for open data, the so called FAIR principles for data (Findable, Accessible, Interoperable, Reuseable) were introduced. These four foundational principles should guide data producers and publishers to ensure transparency, reproducibility, and reusability of data, methods, algorithms, and workflows.",
-                  "@language": "eng"
-                }
-              ],
-              "foaf:homepage": ["https://pharminfo.univie.ac.at/"],
-              "skos:notation": ["ORD 63 Open Research Data"]
-            }
-          ],
-          "frapo:hasFundingAgency": [
-            {
-              "@type": "frapo:FundingAgency",
-              "skos:prefLabel": [
-                {
-                  "@value": "Austrian Science Fund (FWF)",
-                  "@language": "eng"
-                }
-              ],
-              "skos:exactMatch": [""]
-            }
-          ]
-        },
-        {
-          "frapo:isOutputOf": [
-            {
-              "@type": "foaf:Project",
-              "skos:prefLabel": [
-                {
-                  "@value": "EU-ToxRisk",
-                  "@language": "en"
-                }
-              ],
-              "rdfs:comment": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "foaf:homepage": ["https://pharminfo.univie.ac.at/"],
-              "skos:notation": [""]
-            }
-          ],
-          "frapo:hasFundingAgency": [
-            {
-              "@type": "frapo:FundingAgency",
-              "skos:prefLabel": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "skos:exactMatch": [""]
-            }
-          ]
-        },
-        {
-          "frapo:isOutputOf": [
-            {
-              "@type": "foaf:Project",
-              "skos:prefLabel": [
-                {
-                  "@value": "K4DD",
-                  "@language": "en"
-                }
-              ],
-              "rdfs:comment": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "foaf:homepage": ["https://pharminfo.univie.ac.at/"],
-              "skos:notation": [""]
-            }
-          ],
-          "frapo:hasFundingAgency": [
-            {
-              "@type": "frapo:FundingAgency",
-              "skos:prefLabel": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "skos:exactMatch": [""]
-            }
-          ]
-        },
-        {
-          "frapo:isOutputOf": [
-            {
-              "@type": "foaf:Project",
-              "skos:prefLabel": [
-                {
-                  "@value": "Open PHACTS",
-                  "@language": "en"
-                }
-              ],
-              "rdfs:comment": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "foaf:homepage": ["https://pharminfo.univie.ac.at/"],
-              "skos:notation": [""]
-            }
-          ],
-          "frapo:hasFundingAgency": [
-            {
-              "@type": "frapo:FundingAgency",
-              "skos:prefLabel": [
-                {
-                  "@value": "",
-                  "@language": "eng"
-                }
-              ],
-              "skos:exactMatch": [""]
-            }
-          ]
-        }
-      ],
-      /*terms: [
-        {
-          "@id": "FAIRness",
-          "skos:prefLabel": "FAIRness for Life Science Data in Austria"
-        },
-        {
-          "@id": "ReSOLUTE",
-          "skos:prefLabel": "ReSOLUTE: Research Empowerment on Solute Carriers"
-        },
-        {
-          "@id": "eTRANSAFE",
-          "skos:prefLabel":
-            "eTRANSAFE:Enhancing TRANslational SAFEty Assessment through Integrative Knowledge Management"
-        },
-        {
-          "@id": "Ligandeninteraktionen",
-          "skos:prefLabel":
-            "Ligandeninteraktionen und Selektivität der hepatischen OATPs"
-        },
-        {
-          "@id": "TransQST",
-          "skos:prefLabel":
-            "TransQST: Translational quantitative systems toxicology to improve the understanding of the safety of medicines"
-        },
-        { "@id": "EU-ToxRisk", "skos:prefLabel": "EU-ToxRisk" },
-        {
-          "@id": "Liganden für das alpha+/ beta-",
-          "skos:prefLabel": "Liganden für das alpha+/ beta-"
-        },
-        { "@id": "K4DD", "skos:prefLabel": "K4DD" },
-        { "@id": "Open PHACTS", "skos:prefLabel": "Open PHACTS" },
-        {
-          "@id": "Molekulare Arzneistoff-Targets",
-          "skos:prefLabel": "Molekulare Arzneistoff-Targets"
-        },
-        { "@id": "e-Tox", "skos:prefLabel": "e-Tox" },
-        {
-          "@id": "Arzneistoff-Transporter Interak",
-          "skos:prefLabel": "Arzneistoff-Transporter Interak"
-        },
-        { "@id": "EUROPIN", "skos:prefLabel": "EUROPIN" },
-        {
-          "@id": "Deskriptoren/Wirkstoffentwickl.",
-          "skos:prefLabel": "Deskriptoren/Wirkstoffentwickl."
-        },
-        { "@id": "", "skos:prefLabel": "" },
-        { "@id": "", "skos:prefLabel": "" }
-      ]*/ loaded: true
-    },
-    bioassay_type: {
-      terms: [
-        {
-          "@id": "http://www.bioassayontology.org/bao#BAO_0000009 ",
-          "skos:prefLabel": "ADMET"
-        },
-        {
-          "@id": " http://www.bioassayontology.org/bao#BAO_0000041 ",
-          "skos:prefLabel": "binding type"
-        },
-        {
-          "@id": "http://www.bioassayontology.org/bao#BAO_0000010",
-          "skos:prefLabel": "functional"
-        },
-        {
-          "@id": " http://www.bioassayontology.org/bao#BAO_0002810",
-          "skos:prefLabel": "physicochemical"
-        },
-        {
-          "@id": " http://purl.obolibrary.org/obo/ERO_0000923",
-          "skos:prefLabel": "phenotype characterization"
-        }
-      ],
-      loaded: true
-    },
-    anatomical_category: {
-      terms: [
-        {
-          "@id": "http://purl.obolibrary.org/obo/UBERON_0001062",
-          "skos:prefLabel": "Anatomical entity, cross species"
-        },
-        {
-          "@id": "http://purl.obolibrary.org/obo/PO_0025131",
-          "skos:prefLabel": "Plant anatomical entity"
-        },
-        {
-          "@id": "http://purl.obolibrary.org/obo/FAO_0000001",
-          "skos:prefLabel": "Anatomical entity, fungi"
-        },
-        {
-          "@id": "http://purl.obolibrary.org/obo/OMIT_0026581",
-          "skos:prefLabel": "Anatomical entity, bacteria"
-        },
-        {
-          "@id": " http://purl.obolibrary.org/obo/OMIT_0026580",
-          "skos:prefLabel": "Viral structures"
-        }
-      ],
-      loaded: true
-    },
-    life: {
-      terms: [
-        {
-          "@id": "http://purl.obolibrary.org/obo/NCBITaxon_1",
-          "skos:prefLabel": "Living Organisms"
-        },
-        {
-          "@id": "https://web.expasy.org/cellosaurus/",
-          "skos:prefLabel": "Cellosaurus cell-line"
-        }
-      ],
-      loaded: true
-    },
-    biological_macromolecule: {
-      terms: [
-        {
-          "@id": "NCIT:C17021",
-          "skos:prefLabel": "Protein"
-        },
-        {
-          "@id": "BAO:0000582",
-          "skos:prefLabel": "Gene"
-        },
-        {
-          "@id": "CHEBI:15986",
-          "skos:prefLabel": "Polynucleotide"
-        },
-        {
-          "@id": "NCIT_C20130",
-          "skos:prefLabel": "Protein Family"
-        },
-        {
-          "@id": "BAO:0002555",
-          "skos:prefLabel": "Protein Subunit"
-        },
-        {
-          "@id": "BAO:0002554",
-          "skos:prefLabel": "Protein Complex"
-        },
-        {
-          "@id": "CHEBI:18154",
-          "skos:prefLabel": "Polysaccharide"
-        },
-        {
-          "@id": "CHEBI:18059",
-          "skos:prefLabel": "Lipid"
-        }
-      ],
-
-      loaded: true
-    },
-    assay_target: {
-      terms: [
-        {
-          "@id": "NCIT:C17021",
-          "skos:prefLabel": "Protein"
-        },
-        {
-          "@id": "BAO:0000582",
-          "skos:prefLabel": "Gene"
-        },
-        {
-          "@id": "CHEBI:33696",
-          "skos:prefLabel": "Nucleic Acid"
-        },
-        {
-          "@id": "NCIT_C20130",
-          "skos:prefLabel": "Protein Family"
-        },
-        {
-          "@id": "BAO:0002555",
-          "skos:prefLabel": "Protein Subunit"
-        },
-        {
-          "@id": "BAO:0002554",
-          "skos:prefLabel": "Protein Complex"
-        },
-        {
-          "@id": "CHEBI:16646",
-          "skos:prefLabel": "Carbohydrate"
-        },
-        {
-          "@id": "CHEBI:18059",
-          "skos:prefLabel": "Lipid"
-        },
-        {
-          "@id": "NCIT:C48809",
-          "skos:prefLabel": "Small Molecule"
-        },
-        {
-          "@id": "NCIT:C14250",
-          "skos:prefLabel": "Organism"
-        },
-        {
-          "@id": "CL:0000010",
-          "skos:prefLabel": "Cultured Cell"
-        },
-        {
-          "@id": "GO:0044464",
-          "skos:prefLabel": "Cell part"
-        },
-        {
-          "@id": "NCIT:C12801",
-          "skos:prefLabel": "Tissue"
-        }
-      ],
-
-      loaded: true
-    },
-
-    "https://phaidra.org/vocabulary/role": {
-      terms: [],
-      loaded: false
-    },
-
-    "mime-types": {
-      terms: [
-        { "@id": "image/jpeg", "skos:prefLabel": { eng: "JPG/JPEG" } },
-        { "@id": "image/tiff", "skos:prefLabel": { eng: "TIFF" } },
-        { "@id": "image/gif", "skos:prefLabel": { eng: "GIF" } },
-        { "@id": "image/png", "skos:prefLabel": { eng: "PNG" } },
-        { "@id": "image/x-ms-bmp", "skos:prefLabel": { eng: "BMP" } },
-        { "@id": "audio/wav", "skos:prefLabel": { eng: "WAVE" } },
-        { "@id": "audio/mpeg", "skos:prefLabel": { eng: "MP3" } },
-        { "@id": "audio/flac", "skos:prefLabel": { eng: "FLAC" } },
-        { "@id": "audio/ogg", "skos:prefLabel": { eng: "Ogg" } },
-        { "@id": "application/pdf", "skos:prefLabel": { eng: "PDF" } },
-        { "@id": "video/mpeg", "skos:prefLabel": { eng: "MPEG" } },
-        { "@id": "video/avi", "skos:prefLabel": { eng: "AVI" } },
-        { "@id": "video/mp4", "skos:prefLabel": { eng: "MPEG-4" } },
-        { "@id": "video/quicktime", "skos:prefLabel": { eng: "Quicktime" } },
-        { "@id": "video/x-matroska", "skos:prefLabel": { eng: "MKV" } },
-        { "@id": "text/plain", "skos:prefLabel": { eng: "TXT" } },
-        { "@id": "text/csv", "skos:prefLabel": { eng: "CSV" } },
-        {
-          "@id":
-            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
-          "skos:prefLabel": { eng: "XLSX" }
-        },
-        { "@id": "", "skos:prefLabel": { eng: "MPEG-4" } },
-        { "@id": "", "skos:prefLabel": { eng: "Quicktime" } },
-        { "@id": "", "skos:prefLabel": { eng: "MKV" } },
-        {
-          "@id": "chemical / x - mdl - sdfile",
-          "skos:prefLabel": { eng: "X/MDL/SDFILE" }
-        }
-      ],
-      loaded: true
-    },
-
-    "file-types": {
-      terms: [
-        { "@id": "Image", "skos:prefLabel": { eng: "image" } },
-        { "@id": "Document", "skos:prefLabel": { eng: "document" } },
-        { "@id": "Table", "skos:prefLabel": { eng: "table" } },
-        { "@id": "Script", "skos:prefLabel": { eng: "script" } },
-        {
-          "@id": "Chemical file format",
-          "skos:prefLabel": { eng: "chemical file format" }
-        },
-        { "@id": "Folder", "skos:prefLabel": { eng: "folder" } }
-      ],
-      loaded: true
-    }
-  }
-};
-
-const mutations = {
-  setIso6392Terms(state, data) {
-    state.vocabularies["iso639-2"]["terms"] = data;
-  },
-  setRolesTerms(state, marcRoles) {
-    for (var role in marcRoles) {
-      state.vocabularies["https://phaidra.org/vocabulary/role"].terms.push({
-        "@id": role,
-        "skos:prefLabel": { eng: marcRoles[role] }
-      });
-    }
-    state.vocabularies["https://phaidra.org/vocabulary/role"].loaded = true;
-  },
-  initStore(state) {
-    state.vocabularies["https://phaidra.org/vocabulary/role"] = {
-      terms: [],
-      loaded: false
-    };
-  }
-};
-
-const actions = {
-  loadIso6392({ commit }) {
-    commit("setIso6392Terms", languages.get_lang());
-  },
-  loadRoles({ commit, state, rootState }) {
-    if (!state.vocabularies["https://phaidra.org/vocabulary/role"].loaded) {
-      commit("setRolesTerms", rootState.search.marcRoles);
-    }
-  }
-};
-const getters = {
-  getLocalizedTermPharmaLabel: state => (voc, id, lang) => {
-    var terms = state.vocabulariesPharma[voc].terms;
-    for (var i = 0; i < terms.length; i++) {
-      if (terms[i]["@id"] === id) {
-        return terms[i]["skos:prefLabel"][lang]
-          ? terms[i]["skos:prefLabel"][lang]
-          : terms[i]["skos:prefLabel"]["eng"];
-      }
-    }
-  },
-  getTermPharma: state => (voc, id) => {
-    var terms = state.vocabulariesPharma[voc].terms;
-    for (var i = 0; i < terms.length; i++) {
-      if (terms[i]["@id"] === id) {
-        return terms[i];
-      }
-    }
-  },
-  getTermPropertyPharma: state => (voc, id, prop) => {
-    var terms = state.vocabulariesPharma[voc].terms;
-    for (var i = 0; i < terms.length; i++) {
-      if (terms[i]["@id"] === id) {
-        return terms[i][prop];
-      }
-    }
-  }
-};
-export default {
-  state,
-  mutations,
-  actions,
-  getters
-};
diff --git a/src/utils/fields.js b/src/utils/fields.js
index 9f2e5ec61d3946dc7309546ff744fb156e027cf5..2d9b8c70feb28d80b39addb115dbcc6cf67c4a29 100644
--- a/src/utils/fields.js
+++ b/src/utils/fields.js
@@ -1,8 +1,7 @@
 import uuid from "./uuid";
 import inputFormats from "./inputFormats";
 
-const fields = [
-  {
+const fields = [{
     id: "pharma-title",
     predicate: "dce:title",
     label: "Title",
@@ -28,8 +27,7 @@ const fields = [
     hideType: false,
     formValidation: true,
     warning: false,
-    definition:
-      "A point or period of time associated with an event in the lifecycle of the resource."
+    definition: "A point or period of time associated with an event in the lifecycle of the resource."
   },
   {
     id: "abstract",
@@ -51,7 +49,7 @@ const fields = [
   {
     id: "contributors",
     header: "Contributors",
-    label: "Contributions",
+    label: "Contributors",
     type: "schema:Person",
     predicate: "role",
     firstname: "",
@@ -74,37 +72,27 @@ const fields = [
     header: "Association with projects",
     label: "Projects",
     predicate: "frapo:isOutputOf",
-    project: [
-      {
-        "@type": "foaf:Project",
-        "skos:prefLabel": [
-          {
-            "@value": "",
-            "@language": "en"
-          }
-        ],
-        "rdfs:comment": [
-          {
-            "@value": "",
-            "@language": "eng"
-          }
-        ],
-        "foaf:homepage": [""],
-        "skos:notation": [""]
-      }
-    ],
-    agency: [
-      {
-        "@type": "frapo:FundingAgency",
-        "skos:prefLabel": [
-          {
-            "@value": "",
-            "@language": "eng"
-          }
-        ],
-        "skos:exactMatch": [""]
-      }
-    ],
+    project: [{
+      "@type": "foaf:Project",
+      "skos:prefLabel": [{
+        "@value": "",
+        "@language": "en"
+      }],
+      "rdfs:comment": [{
+        "@value": "",
+        "@language": "eng"
+      }],
+      "foaf:homepage": [""],
+      "skos:notation": [""]
+    }],
+    agency: [{
+      "@type": "frapo:FundingAgency",
+      "skos:prefLabel": [{
+        "@value": "",
+        "@language": "eng"
+      }],
+      "skos:exactMatch": [""]
+    }],
     component: "project",
     type: "foaf:Project",
     multiplicable: true,
@@ -132,10 +120,9 @@ const fields = [
     vocabulary: "licenses",
     label: "License",
     value: "",
-    warning: true,
+    warning: false,
     "skos:prefLabel": [],
-    definition:
-      "The value will indicate the copyright, usage and access rights that apply to this digital representation."
+    definition: "The value will indicate the copyright, usage and access rights that apply to this digital representation."
   },
   {
     id: "file",
@@ -147,6 +134,8 @@ const fields = [
     fileFormat: "",
     fileDescription: "",
     fileExtension: "",
+    fileLicense: "",
+    licenseWarning: true,
     formValidation: true,
     warning: true
   },
@@ -161,8 +150,7 @@ const fields = [
     label: "Rights statement",
     value: "",
     language: "",
-    definition:
-      "Information about rights held in and over the resource. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights."
+    definition: "Information about rights held in and over the resource. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights."
   },
   {
     id: "resource-type",
@@ -174,8 +162,9 @@ const fields = [
   {
     id: "1-Biological-macromolecule",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "BiologicalMacromolecule:",
+    // predicate: "select",
+    type: "pharmaWien:biological_macromolecule",
+    //subjectType: "BiologicalMacromolecule:",
     label: "Biological macromolecule:",
     value: "",
     component: "selection",
@@ -192,8 +181,9 @@ const fields = [
   {
     id: "1-Uniprot",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "protein_uniprot", // for freefield @type
+    type: "pharmaWien:uniprot_protein",
+    //type: "skos:Concept",
+    //subjectType: "protein_uniprot", // for freefield @type
     label: "Uniprot record",
     value: "",
     required: false,
@@ -206,15 +196,16 @@ const fields = [
     freefield: false,
     component: "ext-service",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein"],
     description: "Protein",
-    info:
-      "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry"
+    infoRef: "http://purl.obolibrary.org/obo/",
+    info: "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry"
   },
   {
     id: "1-Isoform",
     predicate: "dcterms:subject",
-    type: "protein_isoform",
-    subjectType: "isoform",
+    type: "pharmaWien:isoform_protein",
+    //subjectType: "isoform",
     label: "Isoform:",
     value: "",
     required: false,
@@ -223,16 +214,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein"],
     description: "Protein",
-    info:
-      "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.",
+    info: "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0002646"
   },
   {
     id: "1-Protein-sequence-alteration",
     predicate: "dcterms:subject",
-    type: "protein_ProteinSequenceAlteration",
-    subjectType: "ProteinSequenceAlteration",
+    type: "pharmaWien:proteinSequenceAlteration_protein",
+    //subjectType: "ProteinSequenceAlteration",
     label: "Protein Sequence alteration:",
     value: "",
     required: false,
@@ -241,16 +232,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein"],
     description: "Protein",
-    info:
-      "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]",
-    infoRef: "NCIT:C21070"
+    info: "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]",
+    infoRef: "http://purl.obolibrary.org/obo/NCIT:C21070"
   },
   {
     id: "1-Protein-modification",
     predicate: "dcterms:subject",
-    type: "protein_ProteinModifaction",
-    subjectType: "ProteinModifaction",
+    type: "pharmaWien:proteinModifaction_protein",
+    //subjectType: "ProteinModifaction",
     label: "Protein modifaction:",
     value: "",
     required: false,
@@ -259,16 +250,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein"],
     description: "Protein",
-    info:
-      "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]",
-    infoRef: "protein modification MOD:00000"
+    info: "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]",
+    infoRef: "http://purl.obolibrary.org/obo/MOD:00000"
   },
   {
     id: "1-Entrez-gene-ID",
     predicate: "dcterms:subject",
-    type: "gene_EntrezGene_ID",
-    subjectType: "EntrezGene_ID",
+    type: "pharmaWien:entrezGeneid_gene",
+    //subjectType: "EntrezGene_ID",
     label: "Entrez Gene_ID:",
     value: "",
     required: false,
@@ -277,16 +268,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Gene"],
     description: "Gene",
-    info:
-      "EntrezGene_ID NCIT:C49379 Indicates the accession number for a Gene within the Entrez Gene database. [ NCI ]",
-    infoRef: "NCIT:C49379"
+    info: "EntrezGene_ID NCIT:C49379 Indicates the accession number for a Gene within the Entrez Gene database. [ NCI ]",
+    infoRef: "http://purl.obolibrary.org/obo/NCIT:C49379"
   },
   {
     id: "1-Gene-modification",
     predicate: "dcterms:subject",
-    type: "gene_GeneModification",
-    subjectType: "GeneModification",
+    type: "pharmaWien:modification_gene",
+    //subjectType: "GeneModification",
     label: "Gene modification:",
     value: "",
     required: false,
@@ -295,16 +286,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Gene"],
     description: "Gene",
-    info:
-      "Gene modification NCIT:C126104 Any gene manipulation method used to generate a product with an altered sequence, structure, or conformation. [ NCI ]",
-    infoRef: "NCIT:C126104"
+    info: "Gene modification NCIT:C126104 Any gene manipulation method used to generate a product with an altered sequence, structure, or conformation. [ NCI ]",
+    infoRef: "http://purl.obolibrary.org/obo/NCIT:C126104"
   },
   {
     id: "1-Nucleic-acid-type",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "polynucl_nucleicAcidType",
+    type: "pharmaWien:nucleicAcidType_polyNucl",
+    //subjectType: "polynucl_nucleicAcidType",
     label: "Nucleic acid type:",
     value: "",
     text: "",
@@ -318,14 +309,16 @@ const fields = [
     topId: "CHEBI_15986",
     component: "ext-service",
     category: ["biologicalMacromolecule"],
-    description: "Polynucleotide",
-    info: "CHEBI:15986"
+    subcategory: ["polynucleotide"],
+    description: "polynucleotide",
+    info: "CHEBI:15986",
+    infoRef: "http://purl.obolibrary.org/obo/CHEBI:15986"
   },
   {
     id: "1-RefSeq-accession",
     predicate: "dcterms:subject",
-    type: "RefSeqAccession",
-    subjectType: "polynucl_RefSeqAccession",
+    type: "pharmaWien:refSeqAccession_polynucl",
+    //subjectType: "polynucl_RefSeqAccession",
     label: "RefSeq accession:",
     value: "",
     required: false,
@@ -334,16 +327,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Polynucleotide"],
     description: "Polynucleotide",
-    info:
-      "RefSeq accession EDAM > data:1098  Accession number of a RefSeq database entry. Synonyms: RefSeq ID",
+    info: "RefSeq accession EDAM > data:1098  Accession number of a RefSeq database entry. Synonyms: RefSeq ID",
     infoRef: ""
   },
   {
     id: "1-PFAM-accession",
     predicate: "dcterms:subject",
-    type: "PFAM_accession",
-    subjectType: "protFam_PFAMaccession",
+    type: "pharmaWien:PFAMaccession_protFam",
+    //subjectType: "protFam_PFAMaccession",
     label: "PFAM accession number:",
     value: "",
     required: false,
@@ -352,16 +345,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Family"],
     description: "Protein Family",
-    info:
-      "PFAM accession number EDAM > data:1138 Accession number of a Pfam entry.",
+    info: "PFAM accession number EDAM > data:1138 Accession number of a Pfam entry.",
     infoRef: ""
   },
   {
     id: "1-Uniprot-protein-subunit",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "proteinSub_uniprot",
+    type: "pharmaWien:uniprot_proteinSub",
+    //subjectType: "proteinSub_uniprot",
     label: "Uniprot accession number:",
     value: "",
     text: "",
@@ -373,15 +366,15 @@ const fields = [
     treeview: false,
     component: "ext-service",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Subunit"],
     description: "Protein Subunit",
-    info:
-      "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry"
+    info: "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry"
   },
   {
     id: "1-Isoform-protein-subunit",
     predicate: "dcterms:subject",
-    type: "proteinSub_isoform",
-    subjectType: "isoform_proteinSub",
+    type: "pharmaWien:isoform_proteinSub",
+    //subjectType: "isoform_proteinSub",
     label: "Isoform:",
     value: "",
     required: false,
@@ -391,16 +384,16 @@ const fields = [
     freefield: true,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Subunit"],
     description: "Protein Subunit",
-    info:
-      "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.",
+    info: "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.",
     infoRef: ""
   },
   {
     id: "1-Protein-sequence-alteration-protein-subunit",
     predicate: "dcterms:subject",
-    type: "proteinSub_ProteinSequenceAlteration",
-    subjectType: "ProteinSequenceAlteration_proteinSub",
+    type: "pharmaWien:proteinSequenceAlteration_proteinSub",
+    //subjectType: "ProteinSequenceAlteration_proteinSub",
     label: "Protein Sequence alteration:",
     value: "",
     required: false,
@@ -410,16 +403,16 @@ const fields = [
     freefield: true,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Subunit"],
     description: "Protein Subunit",
-    info:
-      "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]",
+    info: "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]",
     infoRef: "NCIT:C21070"
   },
   {
     id: "1-Protein-modification-protein-subunit",
     predicate: "dcterms:subject",
-    type: "proteinSub_ProteinMod",
-    subjectType: "ProteinMod_proteinSub",
+    type: "pharmaWien:proteinMod_proteinSub",
+    //subjectType: "ProteinMod_proteinSub",
     label: "Protein modification:",
     value: "",
     required: false,
@@ -429,16 +422,16 @@ const fields = [
     freefield: true,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Subunit"],
     description: "Protein Subunit",
-    info:
-      "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]",
+    info: "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]",
     infoRef: "MOD:00000"
   },
   {
     id: "1-Complex-portal-accession",
     predicate: "dcterms:subject",
-    type: "Complex-PortalAccession",
-    subjectType: "ProteinComplex_Complex-PortalAccession",
+    type: "pharmaWien:complexPortalAccession_proteinComplex",
+    //subjectType: "ProteinComplex_Complex-PortalAccession",
     label: "Complex-Portal Accession:",
     value: "",
     required: false,
@@ -447,16 +440,16 @@ const fields = [
     removable: false,
     component: "text-field",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Protein Complex"],
     description: "Protein Complex",
-    info:
-      "A persistent (stable) and unique identifier of the manually curated EMBL-EBI Complex-Portal (Complex Portal",
+    info: "A persistent (stable) and unique identifier of the manually curated EMBL-EBI Complex-Portal (Complex Portal",
     infoRef: ""
   },
   {
     id: "1-Polysaccharide",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "polysaccharide",
+    type: "pharmaWien:polysaccharide",
+    //subjectType: "polysaccharide",
     label: "Polysaccharide name:",
     value: "",
     text: "",
@@ -470,14 +463,15 @@ const fields = [
     topId: "CHEBI_18154",
     component: "ext-service",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Polysaccharide"],
     description: "Polysaccharide",
     info: ""
   },
   {
     id: "1-Lipid",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "lipid",
+    type: "pharmaWien:lipid",
+    //subjectType: "lipid",
     label: "Lipid name:",
     value: "",
     text: "",
@@ -490,14 +484,15 @@ const fields = [
     topId: "CHEBI_18059",
     component: "ext-service",
     category: ["biologicalMacromolecule"],
+    subcategory: ["Lipid"],
     description: "Lipid",
     info: ""
   },
   {
     id: "2-Life",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "life",
+    type: "pharmaWien:life",
+    //subjectType: "life",
     label: "Life:",
     value: "",
     component: "selection",
@@ -507,17 +502,17 @@ const fields = [
     commit: true,
     multiplicable: false,
     visible: true,
-    //category: ["life"],
+    category: ["life"],
+
     vocabulary: "life",
-    info:
-      "Life NCIT:C142142 Thee biochemical phenomenon that distinguishes organisms from inorganic matter. It is characterized by growth, metabolism, and reproduction. [ NCI ]"
+    info: "Life NCIT:C142142 Thee biochemical phenomenon that distinguishes organisms from inorganic matter. It is characterized by growth, metabolism, and reproduction. [ NCI ]"
   },
 
   {
     id: "2-Living-organism",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganism",
+    type: "pharmaWien:LivingOrganism",
+    //subjectType: "LivingOrganism",
     label: "Living Organism:",
     value: "",
     visible: false,
@@ -532,6 +527,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_1",
     category: ["life"],
+
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_1",
@@ -540,8 +536,8 @@ const fields = [
   {
     id: "2-Viruses",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganismVirus",
+    type: "pharmaWien:LivingOrganismVirus",
+    //subjectType: "LivingOrganismVirus",
     label: "Viruses",
     value: "",
     visible: false,
@@ -556,6 +552,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_10239",
     category: ["life"],
+    subcategory: ["Viruses"],
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_10239",
@@ -564,8 +561,8 @@ const fields = [
   {
     id: "2-Viroids",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganismViroids",
+    type: "pharmaWien:LivingOrganismViroids",
+    //subjectType: "LivingOrganismViroids",
     label: "Viroids",
     value: "",
     visible: false,
@@ -580,6 +577,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_12884",
     category: ["life"],
+    subcategory: ["Viroids"],
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_12884",
@@ -588,8 +586,8 @@ const fields = [
   {
     id: "2-cellular-organisms",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganismCellularO",
+    type: "pharmaWien:LivingOrganismCellularO",
+    //subjectType: "LivingOrganismCellularO",
     label: "Cellular organisms",
     value: "",
     visible: false,
@@ -604,6 +602,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_131567",
     category: ["life"],
+    subcategory: ["Cellular organisms"],
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_131567",
@@ -612,9 +611,9 @@ const fields = [
   {
     id: "2-otherSequences",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganism",
-    label: "other sequences:",
+    type: "pharmaWien:LivingOrganismOSeq",
+    //subjectType: "LivingOrganism",
+    label: "Other sequences:",
     value: "",
     visible: false,
     required: false,
@@ -628,6 +627,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_28384",
     category: ["life"],
+    subcategory: ["Other sequences:"],
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_28384",
@@ -636,8 +636,8 @@ const fields = [
   {
     id: "2-unclassifiedSequences",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "LivingOrganism",
+    type: "pharmaWien:LivingOrganismUSeq",
+    //subjectType: "LivingOrganism",
     label: "Unclassified sequences:",
     value: "",
     visible: false,
@@ -652,6 +652,7 @@ const fields = [
     //topId: "NCBITaxon_1",
     topId: "NCBITaxon_12908",
     category: ["life"],
+    subcategory: ["Unclassified sequences:"],
     //baseurl: "http://purl.obolibrary.org/obo/"
     description: "Living Organisms",
     infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_12908",
@@ -660,8 +661,8 @@ const fields = [
   {
     id: "2-cellosaurus",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "cellosaurus",
+    type: "pharmaWien:cellosaurus",
+    //subjectType: "cellosaurus",
     label: "Cellosaurus cell-line:",
     value: "",
     text: "",
@@ -677,8 +678,8 @@ const fields = [
   {
     id: "2-cultured-cell",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "cultured-cell",
+    type: "pharmaWien:cultured-cell",
+    //subjectType: "cultured-cell",
     label: "Cultured cell (CLO):",
     value: "",
     text: "",
@@ -697,8 +698,8 @@ const fields = [
   {
     id: "3-Disease",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "disease",
+    type: "pharmaWien:disease",
+    //subjectType: "disease",
     label: "Disease:",
     value: "",
     text: "",
@@ -710,19 +711,19 @@ const fields = [
     ontology: "mondo",
     topId: "MONDO_0000001",
     ontClass: "",
+    category: ["disease"],
     //ontClass: "MONDO_0000001",
     //ontClass: "MONDO_0000620",
     //baseurl: "http://purl.obolibrary.org/obo/",
     description: "disease or disorder ",
-    info:
-      "disease or disorder MONDO:0000001 A disease is a disposition to undergo pathological processes that exists in an organism because of one or more disorders in that organism. [ OGMS:0000031 ]",
+    info: "disease or disorder MONDO:0000001 A disease is a disposition to undergo pathological processes that exists in an organism because of one or more disorders in that organism. [ OGMS:0000031 ]",
     infoRef: "MONDO:0000001"
   },
   {
     id: "4-Anatomical-category",
     predicate: "dcterms:subject",
     type: "skos:Concept",
-    subjectType: "Anatomical Category:",
+    //subjectType: "Anatomical Category:",
     label: "Anatomical Category:",
     value: "",
     component: "selection",
@@ -737,8 +738,8 @@ const fields = [
   {
     id: "4-Anatomical-entity",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "AnatomEntity",
+    type: "pharmaWien:AnatomEntity",
+    //subjectType: "AnatomEntity",
     label: "Anatomical entity:",
     visible: false,
     //visible: false,
@@ -753,15 +754,16 @@ const fields = [
     topId: "UBERON_0001062",
     freefield: true,
     category: ["anatomicalCategory"],
+    subcategory: ["Anatomical entity"],
     description: "Anatomical entity, cross species",
-    info:
-      "anatomical entity UBERON:0001062 Biological entity that is either an individual member of a biological species or constitutes the structural organization of an individual member of a biological species. [ FMA:62955 http://orcid.org/0000-0001-9114-8737 ]"
+    infoRef: "http://purl.bioontology.org/ontology/",
+    info: "anatomical entity UBERON:0001062 Biological entity that is either an individual member of a biological species or constitutes the structural organization of an individual member of a biological species. [ FMA:62955 http://orcid.org/0000-0001-9114-8737 ]"
   },
   {
     id: "4-Plant-anatomical-entity",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "PlantAnat",
+    type: "pharmaWien:PlantAnat",
+    //subjectType: "PlantAnat",
     label: " Plant anatomical entity:",
     visible: false,
     //visible: false,
@@ -776,15 +778,16 @@ const fields = [
     topId: "PO_0025131",
     freefield: true,
     category: ["anatomicalCategory"],
+    subcategory: ["Plant anatomical entity"],
     description: "Plant anatomical entity",
-    info:
-      "plant anatomical entity PO:0025131 An anatomical entity that is or was part of a plant. [ CARO:0000000 POC:curators ]"
+    infoRef: "http://purl.bioontology.org/ontology/",
+    info: "plant anatomical entity PO:0025131 An anatomical entity that is or was part of a plant. [ CARO:0000000 POC:curators ]"
   },
   {
     id: "4-Fungal-structure",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "FungStruct",
+    type: "pharmaWien:FungStruct",
+    //subjectType: "FungStruct",
     label: "Fungal structure:",
     //visible: true,
     visible: false,
@@ -799,15 +802,17 @@ const fields = [
     topId: "FAO_0000001",
     freefield: true,
     category: ["anatomicalCategory"],
+    subcategory: ["Fungal structure"],
     description: "Anatomical entity, fungi",
+
     info: "The parts of fungi.",
     infoRef: "http://purl.bioontology.org/ontology/MESH/D056229"
   },
   {
     id: "4-Bacterial-structures",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "BactStruct",
+    type: "pharmaWien:BactStruct",
+    //subjectType: "BactStruct",
     label: " Bacterial structures:",
     //visible: true,
     visible: false,
@@ -822,6 +827,7 @@ const fields = [
     topId: "OMIT_0026581",
     freefield: true,
     category: ["anatomicalCategory"],
+    subcategory: ["Bacterial structures"],
     description: "Anatomical entity, bacteria",
     info: "The parts of bacteria.",
     infoRef: "http://purl.bioontology.org/ontology/MESH/D056226"
@@ -829,8 +835,8 @@ const fields = [
   {
     id: "4-Viral-structures",
     predicate: "dcterms:subject",
-    subjectType: "ViralStruct",
-    type: "skos:Concept",
+    //subjectType: "ViralStruct",
+    type: "pharmaWien:ViralStruct",
     label: "Viral structures:",
     //visible: true,
     visible: false,
@@ -845,6 +851,7 @@ const fields = [
     topId: "OMIT_0026580",
     freefield: true,
     category: ["anatomicalCategory"],
+    subcategory: ["Viral structures"],
     description: "Viral structures",
     info: "The parts of bacteria.",
     infoRef: ""
@@ -852,7 +859,7 @@ const fields = [
   {
     id: "5-Molecular-function",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
+    type: "pharmaWien:goMolFunct",
     subjectType: "goMolFunct",
     visible: true,
     label: "GO Molecular Function:",
@@ -865,16 +872,18 @@ const fields = [
     ontology: "go",
     ontClass: "GO_0003674",
     topId: "GO_0003674",
+    category: ["goTerm"],
+    subcategory: ["GO Molecular Function"],
     freefield: true,
     description: "GO Molecular Function:",
-    info:
-      "A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. These actions are described from two distinct but related perspectives: (1) biochemical activity, and (2) role as a component in a larger system/process."
+    infoRef: "http://purl.obolibrary.org/obo/GO_0003674",
+    info: "A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. These actions are described from two distinct but related perspectives: (1) biochemical activity, and (2) role as a component in a larger system/process."
   },
   {
     id: "5-Biological-process",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "goBioProcess",
+    type: "pharmaWien:goBioProcess",
+    //subjectType: "goBioProcess",
     label: "GO Biological Process:",
     visible: true,
     value: "",
@@ -886,17 +895,18 @@ const fields = [
     ontology: "go",
     ontClass: "GO_0008150",
     topId: "GO_0008150",
+    category: ["goTerm"],
+    subcategory: ["GO Biological Process"],
     description: "GO Biological Process:",
     freefield: true,
-    infoRef: "",
-    info:
-      "A biological process represents a specific objective that the organism is genetically programmed to achieve. Biological processes are often described by their outcome or ending state, e.g., the biological process of cell division results in the creation of two daughter cells (a divided cell) from a single parent cell. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence."
+    infoRef: "http://purl.obolibrary.org/obo/GO_0003674",
+    info: "A biological process represents a specific objective that the organism is genetically programmed to achieve. Biological processes are often described by their outcome or ending state, e.g., the biological process of cell division results in the creation of two daughter cells (a divided cell) from a single parent cell. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence."
   },
   {
     id: "5-Cellular-component",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "goCellComp",
+    type: "pharmaWien:goCellComp",
+    //subjectType: "goCellComp",
     visible: true,
     label: "GO Cellular Component:",
     value: "",
@@ -908,16 +918,18 @@ const fields = [
     ontology: "go",
     ontClass: "GO_0005575",
     topId: "GO_0005575",
+    category: ["goTerm"],
+    subcategory: ["GO Cellular Component"],
     freefield: true,
     description: "GO Cellular Component:",
-    info:
-      "A location, relative to cellular compartments and structures, occupied by a macromolecular machine when it carries out a molecular function. There are two ways in which the gene ontology describes locations of gene products: (1) relative to cellular structures (e.g., cytoplasmic side of plasma membrane) or compartments (e.g., mitochondrion), and (2) the stable macromolecular complexes of which they are parts (e.g., the ribosome). [ Sao Paulo MCA-MR Syndrome (ilx_0637672)"
+    infoRef: "http://purl.obolibrary.org/obo/GO_0005575",
+    info: "A location, relative to cellular compartments and structures, occupied by a macromolecular machine when it carries out a molecular function. There are two ways in which the gene ontology describes locations of gene products: (1) relative to cellular structures (e.g., cytoplasmic side of plasma membrane) or compartments (e.g., mitochondrion), and (2) the stable macromolecular complexes of which they are parts (e.g., the ribosome). [ Sao Paulo MCA-MR Syndrome (ilx_0637672)"
   },
   {
     id: "6-Chemical-entities",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "chebiChemEnt",
+    type: "pharmaWien:chebiChemEnt",
+    //subjectType: "chebiChemEnt",
     label: "Chemical Entities:",
     visible: true,
     value: "",
@@ -930,14 +942,15 @@ const fields = [
     infoRef: "http://purl.obolibrary.org/obo/CHEBI_24431",
     freefield: true,
     inchi: true,
-    info:
-      "A chemical entity is a physical entity of interest in chemistry including molecular entities, parts thereof, and chemical substances. ",
+    category: ["chebi"],
+    subcategory: ["Chemical Entities"],
+    info: "A chemical entity is a physical entity of interest in chemistry including molecular entities, parts thereof, and chemical substances. ",
     description: "Chemical entity"
   },
-  {
+  /* {
     id: "6-Atom",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
+    type: "pharmaWien:skos:Concept",
     subjectType: "chebiChemsub",
     label: "Atom:",
     visible: true,
@@ -957,7 +970,7 @@ const fields = [
   {
     id: "6-chemical-substance",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
+    type: "pharmaWien:skos:Concept",
     subjectType: "chebiChemsub",
     label: "Chemical substance:",
     visible: true,
@@ -973,12 +986,12 @@ const fields = [
     inchi: true,
     info: " ",
     description: "Chemical substance"
-  },
+  },*/
   {
     id: "6-Role",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "chebiRole",
+    type: "pharmaWien:chebiRole",
+    //subjectType: "chebiRole",
     label: "Role:",
     visible: true,
     value: "",
@@ -992,13 +1005,15 @@ const fields = [
     infoRef: "http://purl.obolibrary.org/obo/CHEBI_50906",
     info: "A role is particular behaviour which a material entity may exhibit.",
     freefield: true,
+    category: ["chebi"],
+    subcategory: ["Role"],
     description: "Role"
   },
   {
     id: "6-Subatomic-particle",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "chebiSubPart",
+    type: "pharmaWien:chebiSubPart",
+    //subjectType: "chebiSubPart",
     label: "Subatomic particle:",
     visible: true,
     value: "",
@@ -1009,6 +1024,8 @@ const fields = [
     ontology: "chebi",
     ontClass: "CHEBI_36342",
     topId: "CHEBI_36342",
+    category: ["chebi"],
+    subcategory: ["Subatomic particle"],
     freefield: true,
     infoRef: "http://purl.obolibrary.org/obo/CHEBI_36342",
     info: "A particle smaller than an atom.",
@@ -1017,8 +1034,8 @@ const fields = [
   {
     id: "7-Technique",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "technique",
+    type: "pharmaWien:technique",
+    //subjectType: "technique",
     label: "Technique",
     visible: true,
     required: false,
@@ -1029,16 +1046,16 @@ const fields = [
     ontClass: "NCIT_C16847",
     topId: "NCIT_C16847",
     description: "Research technique:",
+    category: ["technique"],
     freefield: true,
-    infoRef:
-      "http://www.ontobee.org/ontology/NCIT?iri=http://purl.obolibrary.org/obo/NCIT_C20368",
+    infoRef: "http://www.ontobee.org/ontology/NCIT?iri=http://purl.obolibrary.org/obo/NCIT_C20368",
     info: "Technique used in the laboratory for scientific research. "
   },
   {
     id: "8-Discipline",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "discipline",
+    type: "pharmaWien:discipline",
+    //subjectType: "discipline",
     label: "Discipline:",
     visible: true,
     required: false,
@@ -1049,6 +1066,7 @@ const fields = [
     ontClass: "NCIT_C19160",
     topId: "NCIT_C19160",
     freefield: true,
+    category: ["discipline"],
     description: "Occupation or Discipline:",
     infoRef: "http://purl.obolibrary.org/obo/NCIT_C19160",
     info: "Info here "
@@ -1058,15 +1076,14 @@ const fields = [
     id: "0-Assay-result",
     predicate: "dcterms:subject",
     type: "skos:Concept",
-    subjectType: "assay_result",
+    //subjectType: "assay_result",
     label: "Uploaded file with assay result",
     value: "",
     component: "assay-selection",
     freefield: false,
     multiplicable: false,
     visible: true,
-    info:
-      "The endpoint is a quantitive or qualitative interpretable standardized representation of a perturbation (a change from a defined reference state of a closed model system) that is measured by the bioassay. An endpoint consists of a series of data points, one for each perturbing agent (screened entity) tested the assay.",
+    info: "The endpoint is a quantitive or qualitative interpretable standardized representation of a perturbation (a change from a defined reference state of a closed model system) that is measured by the bioassay. An endpoint consists of a series of data points, one for each perturbing agent (screened entity) tested the assay.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0000179",
     description: "Assay result:"
   },
@@ -1074,8 +1091,8 @@ const fields = [
   {
     id: "0-Assay-title",
     predicate: "dcterms:subject",
-    type: "Assay-title",
-    subjectType: "Assaytitle",
+    type: "pharmaWien:assayTitle",
+    //subjectType: "Assaytitle",
     visible: true,
     required: false,
     removable: false,
@@ -1084,16 +1101,14 @@ const fields = [
     value: "",
     component: "text-field",
     description: "Assay title",
-    info:
-      "The name of a bioassay which is associated with each assay ID (AID). It contains information about the target tested, the stage of the assay (primary or confirmatory), the assay format (biochemical or cell based), etc.",
-    infoRef:
-      "https://www.ebi.ac.uk/ols/ontologies/bao/terms?iri=http%3A%2F%2Fwww.bioassayontology.org%2Fbao%23BAO_0000521"
+    info: "The name of a bioassay which is associated with each assay ID (AID). It contains information about the target tested, the stage of the assay (primary or confirmatory), the assay format (biochemical or cell based), etc.",
+    infoRef: "https://www.ebi.ac.uk/ols/ontologies/bao/terms?iri=http%3A%2F%2Fwww.bioassayontology.org%2Fbao%23BAO_0000521"
   },
   {
     id: "0-Assay-protocol",
     predicate: "dcterms:subject",
-    type: "Assay-abstract",
-    subjectType: "AssayAbstract",
+    type: "pharmaWien:assayAbstract",
+    //subjectType: "AssayAbstract",
     visible: true,
     required: false,
     removable: false,
@@ -1102,16 +1117,15 @@ const fields = [
     component: "text-field",
     multiline: true,
     category: ["assay"],
-    info:
-      "This includes the methodology used to perform a particular bioassay and is found on the PubChem website associated with each assay ID (AID). It includes the assay components and the order in which they were added, the incubation times, detection method and the kit used, etc.",
+    info: "This includes the methodology used to perform a particular bioassay and is found on the PubChem website associated with each assay ID (AID). It includes the assay components and the order in which they were added, the incubation times, detection method and the kit used, etc.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0000523",
-    description: "Assay target:"
+    description: "Assay target abstract:"
   },
   {
     id: "0-Bioassay-type",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "Bioassay_type",
+    type: "pharmaWien:assayType",
+    //subjectType: "Bioassay_type",
     label: "Bioassay type:",
     visible: true,
     required: false,
@@ -1122,13 +1136,15 @@ const fields = [
     category: ["assay"],
     vocabulary: "bioassay_type",
     stateVoc: "bioassay_type",
-    info: ""
+    info: "",
+    description: "Bioassay type:",
+    infoRef: ""
   },
   {
     id: "0-Bioassay-category",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "bioassayCategory",
+    type: "pharmaWien:bioassayCategory",
+    //subjectType: "bioassayCategory",
     label: "Bioassay category:",
     value: "",
     visible: true,
@@ -1140,15 +1156,14 @@ const fields = [
     category: ["assay"],
     topId: "BAO_0000015",
     description: "Bioassay category:",
-    info:
-      "General assay types like enzyme assay and their subtypes like kinase activity assay",
+    info: "General assay types like enzyme assay and their subtypes like kinase activity assay",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0000015"
   },
   {
     id: "0-Assay-format",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "Assayformat",
+    type: "pharmaWien:assayFormat",
+    //subjectType: "Assayformat",
     label: "Assay format",
     visible: true,
     required: false,
@@ -1160,14 +1175,13 @@ const fields = [
     topId: "BAO_0000019",
     description: "Assay format:",
     category: ["assay"],
-    info:
-      "Assay format is a conceptualization of assays based on the biological and / or chemical features of the experimental system. For example assay formats include biochemical assays - referring to assays with purified protein, cell-based - referring to assays in whole cells, or organism-based - referring to assays performed in an organism.",
+    info: "Assay format is a conceptualization of assays based on the biological and / or chemical features of the experimental system. For example assay formats include biochemical assays - referring to assays with purified protein, cell-based - referring to assays in whole cells, or organism-based - referring to assays performed in an organism.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0000019"
   },
   {
     id: "0-Assay-design-method",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
+    type: "pharmaWien:assayDesignMethod",
     subjectType: "Assay design method",
     label: "Assay design method",
     visible: true,
@@ -1178,19 +1192,18 @@ const fields = [
     ontology: "bao",
     // baseurl: "http://www.bioassayontology.org/bao#",
     ontClass: "BAO_0002202",
-    category: ["assay"],
+    //category: ["assay"],
     topId: "BAO_0002202",
     description: "Assay design method:",
-    info:
-      "The assay design method describes how a biological or physical process screened / investigated in the model system is translated into a detectable signal. This relates to the technology / technologies used to make the assay system work, i.e. enable that the screened process can be detected. It typically involves some manipulation of the (biological) model system to detect the process of interest.",
+    info: "The assay design method describes how a biological or physical process screened / investigated in the model system is translated into a detectable signal. This relates to the technology / technologies used to make the assay system work, i.e. enable that the screened process can be detected. It typically involves some manipulation of the (biological) model system to detect the process of interest.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0002202"
   },
 
   {
     id: "0-Computational-method",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "Computational method",
+    type: "pharmaWien:assayComputationalMethod",
+    //subjectType: "Computational method",
     label: "Computational method",
     visible: true,
     required: false,
@@ -1203,15 +1216,14 @@ const fields = [
     ontClass: "BAO_0002094",
     topId: "BAO_0002094",
     description: "Computational method",
-    info:
-      "Method based on the application of information technology to chemistry and biology.",
+    info: "Method based on the application of information technology to chemistry and biology.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0002094"
   },
   {
     id: "0-Assay-screening-campaign-stage",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "Assay screening campaign stage",
+    type: "pharmaWien:assayScreeningCampaignStage",
+    //subjectType: "Assay screening campaign stage",
     label: "Assay screening campaign stage",
     visible: true,
     required: false,
@@ -1224,17 +1236,16 @@ const fields = [
     category: ["assay"],
     // baseurl: "http://www.bioassayontology.org/bao#",
     description: "Assay screening campaign stage:",
-    info:
-      "The assay stage describes the purpose of the assay in an assay campaign. Assay stage also relates to the order of assays in a screening campaign. For example the primary assay, which is performed first, identifies hits. The primary hits are then confirmed in a confirmatory assay. Subsequent secondary assays are run to eliminate compounds that are not of interest or to confirm hits using an alternate design / technology, or to further characterize compounds. Whether an assay is run in single concentration or concentration response is defined in the class 'assay measurement throughput quality'. For example primary assays are typically run in single concentration with single measurements. However, the NCGC runs qHTS primary assays as concentration-response assays.",
+    info: "The assay stage describes the purpose of the assay in an assay campaign. Assay stage also relates to the order of assays in a screening campaign. For example the primary assay, which is performed first, identifies hits. The primary hits are then confirmed in a confirmatory assay. Subsequent secondary assays are run to eliminate compounds that are not of interest or to confirm hits using an alternate design / technology, or to further characterize compounds. Whether an assay is run in single concentration or concentration response is defined in the class 'assay measurement throughput quality'. For example primary assays are typically run in single concentration with single measurements. However, the NCGC runs qHTS primary assays as concentration-response assays.",
     infoRef: "http://www.bioassayontology.org/bao#BAO_0000029"
   },
   {
     id: "0-Organism",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "AssayOrganism:",
-    label: "Organism",
-    description: "selection",
+    type: "pharmaWien:assayOrg",
+    //subjectType: "AssayOrganism:",
+    label: "Bioassay organism",
+    //description: "selection",
     value: "",
     component: "selection",
     freefield: false,
@@ -1242,68 +1253,95 @@ const fields = [
     visible: true,
     vocabulary: "assay_organism",
     stateVoc: "assay_organism",
-    category: ["assayOrganism"],
+    category: ["assay"],
+    subcategory: ["assayOrganism"],
     multiplicable: true,
-    info:
-      "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.",
+    info: "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.",
+    infoRef: "http://www.bioassayontology.org/bao#BAO:0000551",
+    description: "Bioassay organism:"
+  },
+  {
+    id: "0-Organism-assayTarget",
+    predicate: "dcterms:subject",
+    type: "pharmaWien:assayTarget_organism",
+    //subjectType: "AssayOrganism:",
+    label: "Assay Target Organism",
+    description: "Bioassay Target organism",
+    value: "",
+    component: "selection",
+    freefield: false,
+    commit: true,
+    visible: false,
+    vocabulary: "assayTarget_organism",
+    stateVoc: "organism_assay_target",
+    category: ["assayTarget"],
+    subcategory: ["organismAssayTarget"],
+    multiplicable: true,
+    info: "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.",
     infoRef: "BAO:0000551"
   },
   {
     id: "0-Cellular-organism",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "AssayCellularOrganism",
+    type: "pharmaWien:assayOrganism_CellularOrganism",
+    //subjectType: "AssayCellularOrganism",
     label: "Cellular organism",
     value: "",
     required: false,
     visible: false,
+    freefield: true,
     ontology: "ncbitaxon",
     ontClass: "NCBITaxon_131567",
     topId: "NCBITaxon_131567",
     component: "ext-service",
-    category: ["assayOrganism"],
-    description: "Cellular organism",
+    category: ["assay"],
+    subcategory: ["assayOrganism"],
+    description: "Bioassay organism:",
     info: ""
   },
   {
     id: "0-Viruses",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "AssayViruses",
+    type: "pharmaWien:assayOrganism_Viruses",
+    //subjectType: "AssayViruses",
     label: "Viruses",
     value: "",
     required: false,
     visible: false,
+    freefield: true,
     ontology: "ncbitaxon",
     ontClass: "NCBITaxon_10239",
     topId: "NCBITaxon_10239",
     component: "ext-service",
-    category: ["assayOrganism"],
+    category: ["assay"],
+    subcategory: ["assayOrganism"],
     description: "Viruses",
     info: ""
   },
   {
     id: "0-Viroids",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "AssayViroids",
+    type: "pharmaWien:assayOrganism_Viroids",
+    //subjectType: "AssayViroids",
     label: "Viroids",
     value: "",
+    freefield: true,
     required: false,
     visible: false,
     ontology: "ncbitaxon",
     ontClass: "NCBITaxon_12884",
     topId: "NCBITaxon_12884",
     component: "ext-service",
-    category: ["assayOrganism"],
+    category: ["assay"],
+    subcategory: ["assayOrganism"],
     description: "Viroids",
     info: ""
   },
   {
     id: "0-cell-line",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "cell line cellosaurus",
+    type: "pharmaWien:assayCellosaurus",
+    //subjectType: "cell line cellosaurus",
     label: "Cultured cell",
     visible: true,
     required: false,
@@ -1313,15 +1351,14 @@ const fields = [
     ontClass: "",
     treeview: false,
     description: "Cultured Cell (cellosaurus)",
-    info:
-      "A cell in vitro that is or has been maintained or propagated as part of a cell culture. [ ReO:mhb ]",
+    info: "A cell in vitro that is or has been maintained or propagated as part of a cell culture. [ ReO:mhb ]",
     infoRef: "http://purl.obolibrary.org/obo/CL_0000010"
   },
   {
     id: "0-Assay-target",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "Assay_target",
+    type: "pharmaWien:assayTarget",
+    //subjectType: "Assay_target",
     label: "Assay target ",
     description: "selection",
     value: "",
@@ -1341,8 +1378,8 @@ const fields = [
   {
     id: "0-Small-molecule",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "assay target small molecule",
+    type: "pharmaWien:assayTarget_smallMol",
+    //subjectType: "assay target small molecule",
     label: "Small molecule name:",
     value: "",
     required: false,
@@ -1359,8 +1396,8 @@ const fields = [
   {
     id: "0-cellular-anatomical-entity",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "cellular-anatomical-entity_assayTarget",
+    type: "pharmaWien:assayTarget_cellularAnatomicalEntity",
+    //subjectType: "cellular-anatomical-entity_assayTarget",
     label: "Assay Target Cellular anatomical entity",
     value: "",
     required: false,
@@ -1379,8 +1416,8 @@ const fields = [
   {
     id: "0-tissue",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "tissue_assayTarget",
+    type: "pharmaWien:assayTarget_tissue",
+    //subjectType: "tissue_assayTarget",
     label: "Assay Target Tissue name:",
     value: "",
     required: false,
@@ -1393,15 +1430,14 @@ const fields = [
     component: "ext-service",
     category: ["assayTarget"],
     description: "Tissue",
-    info:
-      "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]",
+    info: "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]",
     infoRef: "NCIT:C12801"
   },
   {
     id: "0-carbohydrate",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "assay target carbohydrate",
+    type: "pharmaWien:assayTarget_carbohydrate",
+    //subjectType: "assay target carbohydrate",
     label: "Assay Target Carbohydrate:",
     value: "",
     required: false,
@@ -1414,15 +1450,14 @@ const fields = [
     component: "ext-service",
     category: ["assayTarget"],
     description: "Carbohydrate",
-    info:
-      "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]",
+    info: "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]",
     infoRef: "NCIT:C12801"
   },
   {
     id: "0-detection",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "assay_detection",
+    type: "pharmaWien:assay_detection",
+    //subjectType: "assay_detection",
     label: "Detection method:",
     description: "selection",
     value: "",
@@ -1437,15 +1472,14 @@ const fields = [
     category: ["assayDetection"],
     multiplicable: true,
     component: "selection",
-    info:
-      "The physical method (technology) used to measure / readout the effect caused by a perturbagen in the assay environment.",
+    info: "The physical method (technology) used to measure / readout the effect caused by a perturbagen in the assay environment.",
     infoRef: ""
   },
   {
     id: "0-detection_method",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "physical_detection_method",
+    type: "pharmaWien:assay_physicalDetectionMethod",
+    //subjectType: "physical_detection_method",
     label: "Physical detection method:",
     value: "",
     required: false,
@@ -1464,8 +1498,8 @@ const fields = [
   {
     id: "0-detection_instrument",
     predicate: "dcterms:subject",
-    type: "skos:Concept",
-    subjectType: "detection_instrument",
+    type: "pharmaWien:assay_physicalDetectionInstrument",
+    //subjectType: "detection_instrument",
     label: "Detection instrument:",
     value: "",
     required: false,
@@ -1556,11 +1590,11 @@ const predicateOrder = [
 ];
 
 export default {
-  getFields: function() {
+  getFields: function () {
     return fields;
   },
 
-  getEditableFields: function() {
+  getEditableFields: function () {
     var editable = fields.filter(item => !item.readonly);
     // hack: some bug in vuetify autocomplete can't handle the value property
     var newarr = [];
@@ -1571,7 +1605,7 @@ export default {
     }
     return newarr;
   },
-  getField: function(id, ordergroup) {
+  getField: function (id, ordergroup) {
     for (var i = 0; i < fields.length; i++) {
       if (fields[i]["id"] === id) {
         var field = JSON.parse(JSON.stringify(fields[i]));
@@ -1581,16 +1615,16 @@ export default {
       }
     }
   },
-  getFieldbySubject: function(subject) {
+  getFieldbySubject: function (subject) {
     for (var i = 0; i < fields.length; i++) {
-      if (fields[i]["subjectType"] === subject) {
+      if (fields[i]["type"] === subject) {
         var field = JSON.parse(JSON.stringify(fields[i]));
         field.id = field.id + "_" + uuid.generate();
         return field;
       }
     }
   },
-  getFieldsLabelsbyCateg: function(categ) {
+  getFieldsLabelsbyCateg: function (categ) {
     var ar = [];
 
     for (var i = 0; i < fields.length; i++) {
@@ -1605,7 +1639,7 @@ export default {
     }
     return ar;
   },
-  getPredicateOrder: function() {
+  getPredicateOrder: function () {
     return predicateOrder;
   }
-};
+};
\ No newline at end of file
diff --git a/src/utils/json-ld.js b/src/utils/json-ld.js
index 93b1f184d32819460408651b75346d036b81e601..1eb19dc18f83341d67729fff8b8d60c5b3b39495 100644
--- a/src/utils/json-ld.js
+++ b/src/utils/json-ld.js
@@ -1,24 +1,1226 @@
 import fields from "./fields";
 
 export default {
+  json2components: function (jsonld, options) {
+    var components = [];
+
+    // all dce:subjects in the same language are handled by 1 component
+    let keywords = {};
+    Object.entries(jsonld).forEach(([key, value]) => {
+      //console.log("in here", key);
+      if (key === "dce:subject") {
+        for (let v of value) {
+          if (v["@type"] === "skos:Concept") {
+            for (let pl of v["skos:prefLabel"]) {
+              let lang = pl["@language"] ? pl["@language"] : "xxx";
+              if (!keywords[lang]) {
+                keywords[lang] = [];
+              }
+              keywords[lang].push(pl["@value"]);
+            }
+          }
+        }
+      }
+    });
+    Object.entries(keywords).forEach(([key, value]) => {
+      let f = fields.getField("keyword");
+      if (key !== "xxx") {
+        f.language = key;
+      }
+      f.value = value;
+      components.push(f);
+    });
+
+    Object.entries(jsonld).forEach(([key, value]) => {
+      if (key !== "@type") {
+        var i;
+        var j;
+        for (i = 0; i < value.length; i++) {
+          var f;
+          //console.log("value", value[i]);
+          switch (key) {
+            // rdam:P30004
+            case "rdam:P30004":
+              f = fields.getField("alternate-identifier");
+              f.type = value[i]["@type"];
+              f.value = value[i]["@value"];
+              components.push(f);
+              break;
+
+              // dcterms:type
+            case "dcterms:type":
+              //take this off ISA
+              /* f = fields.getField("resource-type");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);*/
+              components.push({});
+              break;
+
+              // edm:hasType
+            case "edm:hasType":
+              f = fields.getField("object-type");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // schema:genre
+            case "schema:genre":
+              f = fields.getField("genre");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // oaire:version
+            case "oaire:version":
+              f = fields.getField("version-type");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // dcterms:accessRights
+            case "dcterms:accessRights":
+              f = fields.getField("access-right");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // dce:title
+            case "dce:title":
+              if (
+                value[i]["@type"] === "bf:Title" ||
+                value[i]["@type"] === "bf:ParallelTitle"
+              ) {
+                f = fields.getField("pharma-title");
+                //console.log("value[i]['@type']", f);
+                f.type = value[i]["@type"];
+                if (value[i]["bf:mainTitle"]) {
+                  for (j = 0; j < value[i]["bf:mainTitle"].length; j++) {
+                    f.title = value[i]["bf:mainTitle"][j]["@value"];
+                    f.language = value[i]["bf:mainTitle"][j]["@language"] ?
+                      value[i]["bf:mainTitle"][j]["@language"] :
+                      "eng";
+                  }
+                }
+                if (value[i]["bf:subtitle"]) {
+                  for (j = 0; j < value[i]["bf:subtitle"].length; j++) {
+                    f.subtitle = value[i]["bf:subtitle"][j]["@value"];
+                  }
+                }
+                components.push(f);
+              }
+              break;
+
+              // bf:note
+            case "bf:note":
+              switch (value[i]["@type"]) {
+                case "bf:Note":
+                  f = fields.getField("description");
+                  break;
+                case "bf:Summary":
+                  f = fields.getField("abstract");
+                  break;
+                case "phaidra:Remark":
+                  f = fields.getField("note");
+                  break;
+                case "phaidra:DigitizationNote":
+                  f = fields.getField("digitization-note");
+                  break;
+                case "arm:ConditionAssessment":
+                  f = fields.getField("condition-note");
+                  break;
+                case "phaidra:ReproductionNote":
+                  f = fields.getField("reproduction-note");
+                  break;
+              }
+
+              for (let prefLabel of value[i]["skos:prefLabel"]) {
+                f.value = prefLabel["@value"];
+                f.language = prefLabel["@language"] ?
+                  prefLabel["@language"] :
+                  "";
+              }
+              components.push(f);
+              break;
+
+              // bf:tableOfContents
+            case "bf:tableOfContents":
+              f = fields.getField("table-of-contents");
+              for (let prefLabel of value[i]["skos:prefLabel"]) {
+                f.value = prefLabel["@value"];
+                f.language = prefLabel["@language"] ?
+                  prefLabel["@language"] :
+                  "";
+              }
+              components.push(f);
+              break;
+
+              // dcterms:language
+            case "dcterms:language":
+              f = fields.getField("language");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // schema:subtitleLanguage
+            case "schema:subtitleLanguage":
+              f = fields.getField("subtitle-language");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // dce:subject
+            case "dce:subject":
+              // noop - we handled this already
+              break;
+
+              // dcterms:subject
+            case "dcterms:subject":
+              if (value[i]["@type"] === "skos:Concept") {
+
+                //ISA THAT THIS OFF FOR NOW
+                /* f = fields.getField("vocab-ext-readonly");
+                f["skos:exactMatch"] = value[i]["skos:exactMatch"];
+                f["skos:prefLabel"] = value[i]["skos:prefLabel"];
+                f["rdfs:label"] = value[i]["rdfs:label"];
+                if (value[i]["skos:exactMatch"]) {
+                  for (j = 0; j < value[i]["skos:exactMatch"].length; j++) {
+                    f.value = value[i]["skos:exactMatch"][j];
+                  }
+                }
+                if (value[i]["skos:notation"]) {
+                  f["skos:notation"] = [];
+                  for (j = 0; j < value[i]["skos:notation"].length; j++) {
+                    f["skos:notation"].push(value[i]["skos:notation"][j]);
+                  }
+                }
+                f.predicate = key;
+                f.label = "Classification";
+                components.push(f);*/
+                components.push({});
+                // TODO: add classification
+              } else if (value[i]["@type"] === "phaidra:Subject") {
+                // ignore, handled elsewhere
+              } else {
+
+              }
+              break;
+
+            case "rdau:P60193":
+              f = fields.getField("series");
+              if (value[i]["dce:title"]) {
+                for (let t of value[i]["dce:title"]) {
+                  if (t["bf:mainTitle"]) {
+                    for (let mt of t["bf:mainTitle"]) {
+                      if (mt["@value"]) {
+                        f.title = mt["@value"];
+                      }
+                      if (mt["@language"]) {
+                        f.titleLanguage = mt["@language"];
+                      }
+                    }
+                  }
+                }
+              }
+              if (value[i]["bibo:volume"]) {
+                for (let v of value[i]["bibo:volume"]) {
+                  f.volume = v;
+                }
+              }
+              if (value[i]["bibo:issue"]) {
+                for (let v of value[i]["bibo:issue"]) {
+                  f.issue = v;
+                }
+              }
+              if (value[i]["dcterms:issued"]) {
+                for (let v of value[i]["dcterms:issued"]) {
+                  f.issued = v;
+                }
+              }
+              if (value[i]["identifiers:issn"]) {
+                for (let v of value[i]["identifiers:issn"]) {
+                  f.issn = v;
+                }
+              }
+              if (value[i]["skos:exactMatch"]) {
+                for (let v of value[i]["skos:exactMatch"]) {
+                  f.identifier = v;
+                }
+              }
+              Object.entries(jsonld).forEach(([key1, value1]) => {
+                if (key1 === "schema:pageStart") {
+                  for (let ps of value1) {
+                    f.pageStart = ps;
+                  }
+                }
+                if (key1 === "schema:pageEnd") {
+                  for (let pe of value1) {
+                    f.pageEnd = pe;
+                  }
+                }
+              });
+              components.push(f);
+              break;
+
+            case "rdau:P60101":
+              f = fields.getField("contained-in");
+              if (value[i]["dce:title"]) {
+                for (let t of value[i]["dce:title"]) {
+                  if (t["bf:mainTitle"]) {
+                    for (let mt of t["bf:mainTitle"]) {
+                      if (mt["@value"]) {
+                        f.title = mt["@value"];
+                      }
+                      if (mt["@language"]) {
+                        f.titleLanguage = mt["@language"];
+                      }
+                    }
+                  }
+                  if (t["bf:subtitle"]) {
+                    for (let st of t["bf:subtitle"]) {
+                      if (st["@value"]) {
+                        f.subtitle = st["@value"];
+                      }
+                    }
+                  }
+                }
+              }
+              f.roles = [];
+              Object.entries(value[i]).forEach(([key, value]) => {
+                if (key.startsWith("role")) {
+                  let roleidx = 0;
+                  for (let role of value) {
+                    roleidx++;
+                    let entity = {
+                      id: "contained-in-role-" + roleidx,
+                      role: key,
+                      ordergroup: "contained-in-role"
+                    };
+                    if (role["schema:name"]) {
+                      for (let name of role["schema:name"]) {
+                        entity.name = name["@value"];
+                      }
+                    }
+                    if (role["schema:familyName"]) {
+                      for (let lastname of role["schema:familyName"]) {
+                        entity.lastname = lastname["@value"];
+                      }
+                    }
+                    if (role["schema:givenName"]) {
+                      for (let firstname of role["schema:givenName"]) {
+                        entity.firstname = firstname["@value"];
+                      }
+                    }
+                    f.roles.push(entity);
+                  }
+                }
+              });
+              Object.entries(jsonld).forEach(([key1, value1]) => {
+                if (key1 === "schema:pageStart") {
+                  for (let ps of value1) {
+                    f.pageStart = ps;
+                  }
+                }
+                if (key1 === "schema:pageEnd") {
+                  for (let pe of value1) {
+                    f.pageEnd = pe;
+                  }
+                }
+              });
+              if (value[i]["rdau:P60193"]) {
+                for (let series of value[i]["rdau:P60193"]) {
+                  if (series["dce:title"]) {
+                    for (let t of series["dce:title"]) {
+                      if (t["bf:mainTitle"]) {
+                        for (let mt of t["bf:mainTitle"]) {
+                          if (mt["@value"]) {
+                            f.seriesTitle = mt["@value"];
+                          }
+                          if (mt["@language"]) {
+                            f.seriesTitleLanguage = mt["@language"];
+                          }
+                        }
+                      }
+                    }
+                  }
+                  if (series["bibo:volume"]) {
+                    for (let v of series["bibo:volume"]) {
+                      f.seriesVolume = v;
+                    }
+                  }
+                  if (series["bibo:issue"]) {
+                    for (let v of series["bibo:issue"]) {
+                      f.seriesIssue = v;
+                    }
+                  }
+                  if (series["dcterms:issued"]) {
+                    for (let v of series["dcterms:issued"]) {
+                      f.seriesIssued = v;
+                    }
+                  }
+                  if (series["identifiers:issn"]) {
+                    for (let v of series["identifiers:issn"]) {
+                      f.seriesIssn = v;
+                    }
+                  }
+                  if (series["skos:exactMatch"]) {
+                    for (let v of series["skos:exactMatch"]) {
+                      f.seriesIdentifier = v;
+                    }
+                  }
+                }
+              }
+              components.push(f);
+              break;
+
+              // dcterms:temporal
+            case "dcterms:temporal":
+              f = fields.getField("temporal-coverage");
+              f.value = value[i]["@value"];
+              f.language = value[i]["@language"] ?
+                value[i]["@language"] :
+                "eng";
+              components.push(f);
+              break;
+
+              // spatial
+            case "dcterms:spatial":
+            case "vra:placeOfCreation":
+            case "vra:placeOfRepository":
+            case "vra:placeOfSite":
+              if (
+                value[i]["@type"] === "schema:Place" &&
+                !value[i]["skos:exactMatch"]
+              ) {
+                // freetext
+                f = fields.getField("spatial-text");
+                f.type = key;
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              } else {
+                if (
+                  value[i]["@type"] === "schema:Place" &&
+                  value[i]["skos:exactMatch"]
+                ) {
+                  // getty
+                  f = fields.getField("spatial-getty-readonly");
+                  if (value[i]["skos:exactMatch"]) {
+                    for (j = 0; j < value[i]["skos:exactMatch"].length; j++) {
+                      f.value = value[i]["skos:exactMatch"][j];
+                    }
+                  }
+                  f["skos:prefLabel"] = value[i]["skos:prefLabel"];
+                  f["rdfs:label"] = value[i]["rdfs:label"];
+                  f.coordinates = value[i]["schema:geo"];
+                  f.predicate = key;
+                  f.type = key;
+                  f.label = key;
+                  components.push(f);
+                  f = fields.getField("spatial-getty");
+                  f.predicate = key;
+                  f.type = key;
+                  components.push(f);
+                }
+              }
+              break;
+
+              // dce:format
+            case "dce:format":
+              f = fields.getField("dce-format-vocab");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // rdau:P60048
+            case "rdau:P60048":
+              f = fields.getField("carrier-type");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // edm:rights
+            case "edm:rights":
+              f = fields.getField("license");
+              f.vocabulary = "alllicenses";
+              f.value = value[i];
+              components.push(f);
+              break;
+
+              // dce:rights
+            case "dce:rights":
+              f = fields.getField("rights");
+              f.value = value[i]["@value"];
+              f.language = value[i]["@language"] ?
+                value[i]["@language"] :
+                "eng";
+              components.push(f);
+              break;
+
+              // bf:provisionActivity
+            case "bf:provisionActivity":
+              f = fields.getField("bf-publication");
+              if (value[i]["bf:agent"]) {
+                for (let pub of value[i]["bf:agent"]) {
+                  if (pub["skos:exactMatch"]) {
+                    for (let id of pub["skos:exactMatch"]) {
+                      if (id.startsWith("https://pid.phaidra.org/")) {
+                        f.publisherType = "select";
+                        f.publisherOrgUnit = id;
+                      } else {
+                        f.publisherType = "other";
+                        if (pub["schema:name"]) {
+                          for (let name of pub["schema:name"]) {
+                            f.publisherName = name["@value"];
+                          }
+                        }
+                      }
+                    }
+                  } else {
+                    if (pub["schema:name"]) {
+                      f.publisherType = "other";
+                      if (pub["schema:name"]) {
+                        for (let name of pub["schema:name"]) {
+                          f.publisherName = name["@value"];
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+              if (value[i]["bf:place"]) {
+                for (let pl of value[i]["bf:place"]) {
+                  if (pl["skos:prefLabel"]) {
+                    for (let pllab of pl["skos:prefLabel"]) {
+                      f.publishingPlace = pllab["@value"];
+                    }
+                  }
+                }
+              }
+              if (value[i]["bf:date"]) {
+                for (let pdate of value[i]["bf:date"]) {
+                  f.publishingDate = pdate;
+                }
+              }
+              components.push(f);
+              break;
+
+              // citation
+            case "cito:cites":
+            case "cito:isCitedBy":
+              f = fields.getField("citation");
+              f.type = key;
+              for (let prefLabel of value[i]["skos:prefLabel"]) {
+                f.citation = prefLabel["@value"];
+                f.citationLanguage = prefLabel["@language"] ?
+                  prefLabel["@language"] :
+                  "";
+              }
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.identifier = em;
+              }
+              components.push(f);
+              break;
+
+              // rdau:P60227
+            case "rdau:P60227":
+              f = fields.getField("movieadaptation");
+              if (value[i]["dce:title"]) {
+                for (let t of value[i]["dce:title"]) {
+                  if (t["bf:mainTitle"]) {
+                    for (let mt of t["bf:mainTitle"]) {
+                      if (mt["@value"]) {
+                        f.title = mt["@value"];
+                      }
+                      if (mt["@language"]) {
+                        f.titleLanguage = mt["@language"];
+                      }
+                    }
+                    if (t["bf:subtitle"]) {
+                      for (let st of t["bf:subtitle"]) {
+                        if (st["@value"]) {
+                          f.subtitle = st["@value"];
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+              for (let [pred, obj] of Object.entries(value[i])) {
+                if (pred.startsWith("role")) {
+                  for (let role of obj) {
+                    if (role["@type"] === "schema:Person") {
+                      f.role = pred;
+                      if (role["schema:name"]) {
+                        for (let name of role["schema:name"]) {
+                          f.name = name["@value"];
+                          f.showname = true;
+                        }
+                      }
+                      if (role["schema:familyName"]) {
+                        for (let lastname of role["schema:familyName"]) {
+                          f.lastname = lastname["@value"];
+                        }
+                      }
+                      if (role["schema:givenName"]) {
+                        for (let firstname of role["schema:givenName"]) {
+                          f.firstname = firstname["@value"];
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+              components.push(f);
+              break;
+
+              // frapo:hasFundingAgency
+            case "frapo:hasFundingAgency":
+              if (value[i]["@type"] === "frapo:FundingAgency") {
+                //ISA take here off
+                /* f = fields.getField("funder");
+                if (value[i]["skos:prefLabel"]) {
+                  for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                    f.name = value[i]["skos:prefLabel"][j]["@value"];
+                    f.nameLanguage = value[i]["skos:prefLabel"][j]["@language"]
+                      ? value[i]["skos:prefLabel"][j]["@language"]
+                      : "eng";
+                  }
+                }
+                if (value[i]["skos:exactMatch"]) {
+                  for (let em of value[i]["skos:exactMatch"]) {
+                    f.identifier = em;
+                  }
+                }
+                components.push(f);*/
+                components.push({});
+              }
+              break;
+
+              // frapo:isOutputOf
+            case "frapo:isOutputOf":
+              if (value[i]["@type"] === "foaf:Project") {
+                //ISA take here off
+                /* f = fields.getField("project");
+                if (value[i]["skos:prefLabel"]) {
+                  for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                    f.name = value[i]["skos:prefLabel"][j]["@value"];
+                    f.nameLanguage = value[i]["skos:prefLabel"][j]["@language"]
+                      ? value[i]["skos:prefLabel"][j]["@language"]
+                      : "eng";
+                  }
+                }
+                if (value[i]["rdfs:comment"]) {
+                  for (j = 0; j < value[i]["rdfs:comment"].length; j++) {
+                    f.description = value[i]["rdfs:comment"][j]["@value"];
+                    f.descriptionLanguage = value[i]["rdfs:comment"][j][
+                      "@language"
+                    ]
+                      ? value[i]["rdfs:comment"][j]["@language"]
+                      : "eng";
+                  }
+                }
+                if (value[i]["skos:exactMatch"]) {
+                  for (j = 0; j < value[i]["skos:exactMatch"].length; j++) {
+                    f.identifier = value[i]["skos:exactMatch"][j];
+                  }
+                }
+                if (value[i]["foaf:homepage"]) {
+                  for (j = 0; j < value[i]["foaf:homepage"].length; j++) {
+                    f.homepage = value[i]["foaf:homepage"][j];
+                  }
+                }
+                if (value[i]["frapo:hasFundingAgency"]) {
+                  for (let funder of value[i]["frapo:hasFundingAgency"]) {
+                    if (funder["skos:prefLabel"]) {
+                      for (let pl of funder["skos:prefLabel"]) {
+                        f.funderName = pl["@value"];
+                        f.funderNameLanguage = pl["@language"]
+                          ? pl["@language"]
+                          : "eng";
+                      }
+                    }
+                    if (funder["skos:exactMatch"]) {
+                      for (let em of funder["skos:exactMatch"]) {
+                        f.funderIdentifier = em;
+                      }
+                    }
+                  }
+                }
+                components.push(f);*/
+                components.push({});
+              } else {
+                if (value[i]["@type"] === "aaiso:Programme") {
+                  f = fields.getField("study-plan");
+                  if (value[i]["skos:prefLabel"]) {
+                    for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                      f.name = value[i]["skos:prefLabel"][j]["@value"];
+                      f.nameLanguage = value[i]["skos:prefLabel"][j][
+                          "@language"
+                        ] ?
+                        value[i]["skos:prefLabel"][j]["@language"] :
+                        "eng";
+                    }
+                  }
+                  if (value[i]["skos:notation"]) {
+                    for (j = 0; j < value[i]["skos:notation"].length; j++) {
+                      f.notation = value[i]["skos:notation"][j];
+                    }
+                  }
+                  components.push(f);
+                }
+              }
+              break;
+
+              // rdax:P00009
+            case "rdax:P00009":
+              f = fields.getField("association");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // dcterms:provenance
+            case "dcterms:provenance":
+              if (value[i]["@type"] === "dcterms:ProvenanceStatement") {
+                f = fields.getField("provenance");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              }
+              break;
+
+              // schema:numberOfPages
+            case "schema:numberOfPages":
+              f = fields.getField("number-of-pages");
+              f.label = key;
+              f.value = value[i];
+              components.push(f);
+              break;
+
+              // bf:soundCharacteristic
+            case "bf:soundCharacteristic":
+              f = fields.getField("sound-characteristic");
+              f.label = key;
+              f.value = value[i];
+              components.push(f);
+              break;
+
+              // bf:supplementaryContent
+            case "bf:supplementaryContent":
+              f = fields.getField("supplementary-content");
+              for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                f.value = value[i]["skos:prefLabel"][j]["@value"];
+                f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                  value[i]["skos:prefLabel"][j]["@language"] :
+                  "eng";
+              }
+              components.push(f);
+              break;
+
+              // bf:awards
+            case "bf:awards":
+              f = fields.getField("award");
+              for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                f.value = value[i]["skos:prefLabel"][j]["@value"];
+                f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                  value[i]["skos:prefLabel"][j]["@language"] :
+                  "eng";
+              }
+              components.push(f);
+              break;
+
+              // rdau:P60059
+            case "rdau:P60059":
+              f = fields.getField("regional-encoding");
+              for (let em of value[i]["skos:exactMatch"]) {
+                f.value = em;
+              }
+              components.push(f);
+              break;
+
+              // ebucore:filename
+            case "ebucore:filename":
+              f = fields.getField("filename");
+              f.predicate = key;
+              f.label = key;
+              f.value = value[i];
+              components.push(f);
+              break;
+
+              // ebucore:hasMimeType
+            case "ebucore:hasMimeType":
+              f = fields.getField("mime-type");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // opaque:cco_accessionNumber
+            case "opaque:cco_accessionNumber":
+              f = fields.getField("accession-number");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // bf:shelfMark
+            case "bf:shelfMark":
+              f = fields.getField("shelf-mark");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // bf:physicalLocation
+            case "bf:physicalLocation":
+              f = fields.getField("physical-location");
+              f.value = value[i]["@value"];
+              f.language = value[i]["@language"] ?
+                value[i]["@language"] :
+                "eng";
+              components.push(f);
+              break;
+
+              // rdau:P60550
+            case "rdau:P60550":
+              f = fields.getField("extent");
+              f.value = value[i]["@value"];
+              f.language = value[i]["@language"] ?
+                value[i]["@language"] :
+                "eng";
+              components.push(f);
+              break;
+
+              // vra:hasInscription
+            case "vra:hasInscription":
+              if (value[i]["@type"] === "vra:Inscription") {
+                f = fields.getField("inscription");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              }
+              break;
+
+              // bf:scale
+            case "bf:scale":
+              if (value[i]["@type"] === "bf:Scale") {
+                f = fields.getField("scale");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                }
+                components.push(f);
+              }
+              break;
+
+              // vra:material
+            case "vra:material":
+              if (value[i]["@type"] === "vra:Material") {
+                f = fields.getField("material-text");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              } else {
+                // vra:material - vocab
+                if (
+                  value[i]["@type"] === "vra:material" &&
+                  value[i]["skos:exactMatch"]
+                ) {
+                  f = fields.getField("material-vocab");
+                  for (let em of value[i]["skos:exactMatch"]) {
+                    f.value = em;
+                  }
+                  components.push(f);
+                }
+              }
+              break;
+
+              // vra:hasTechnique
+            case "vra:hasTechnique":
+              if (
+                value[i]["@type"] === "vra:Technique" &&
+                !value[i]["skos:exactMatch"]
+              ) {
+                f = fields.getField("technique-text");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              } else {
+                // vra:hasTechnique - vocab
+                if (
+                  value[i]["@type"] === "vra:Technique" &&
+                  value[i]["skos:exactMatch"]
+                ) {
+                  f = fields.getField("technique-vocab");
+                  for (let em of value[i]["skos:exactMatch"]) {
+                    f.value = em;
+                  }
+                  components.push(f);
+                }
+              }
+              break;
+
+              // dcterms:audience
+            case "dcterms:audience":
+              if (
+                value[i]["@type"] === "dcterms:audience" &&
+                !value[i]["skos:exactMatch"]
+              ) {
+                f = fields.getField("audience");
+                for (j = 0; j < value[i]["skos:prefLabel"].length; j++) {
+                  f.value = value[i]["skos:prefLabel"][j]["@value"];
+                  f.language = value[i]["skos:prefLabel"][j]["@language"] ?
+                    value[i]["skos:prefLabel"][j]["@language"] :
+                    "eng";
+                }
+                components.push(f);
+              } else {
+                // dcterms:audience - select
+                if (
+                  value[i]["@type"] === "dcterms:audience" &&
+                  value[i]["skos:exactMatch"]
+                ) {
+                  f = fields.getField("audience-vocab");
+                  for (let em of value[i]["skos:exactMatch"]) {
+                    f.value = em;
+                  }
+                  components.push(f);
+                }
+              }
+              break;
+
+              // schema:width
+            case "schema:width":
+              if (value[i]["@type"] === "schema:QuantitativeValue") {
+                f = fields.getField("width");
+                for (j = 0; j < value[i]["schema:unitCode"].length; j++) {
+                  f.unit = value[i]["schema:unitCode"][j];
+                }
+                for (j = 0; j < value[i]["schema:value"].length; j++) {
+                  f.value = value[i]["schema:value"][j];
+                }
+                components.push(f);
+              }
+              break;
+
+              // schema:height
+            case "schema:height":
+              if (value[i]["@type"] === "schema:QuantitativeValue") {
+                f = fields.getField("height");
+                for (j = 0; j < value[i]["schema:unitCode"].length; j++) {
+                  f.unit = value[i]["schema:unitCode"][j];
+                }
+                for (j = 0; j < value[i]["schema:value"].length; j++) {
+                  f.value = value[i]["schema:value"][j];
+                }
+                components.push(f);
+              }
+              break;
+
+              // schema:depth
+            case "schema:depth":
+              if (value[i]["@type"] === "schema:QuantitativeValue") {
+                f = fields.getField("depth");
+                for (j = 0; j < value[i]["schema:unitCode"].length; j++) {
+                  f.unit = value[i]["schema:unitCode"][j];
+                }
+                for (j = 0; j < value[i]["schema:value"].length; j++) {
+                  f.value = value[i]["schema:value"][j];
+                }
+                components.push(f);
+              }
+              break;
+
+              // dates
+            case "dcterms:date":
+            case "dcterms:created":
+            case "dcterms:modified":
+            case "dcterms:available":
+            case "dcterms:issued":
+            case "dcterms:valid":
+            case "dcterms:dateAccepted":
+            case "dcterms:dateCopyrighted":
+            case "dcterms:dateSubmitted":
+            case "rdau:P60071":
+            case "phaidra:dateAccessioned":
+              // only edtf now (later time can be edm:TimeSpan)
+              //COMMENT ISA THIS IS NOT WORKING< COMMENT OUT
+              /* if (typeof value[i] === "string") {
+                f = fields.getField("date-edtf");
+                f.type = key;
+                f.value = value[i];
+                components.push(f);
+              }*/
+              components.push({});
+              break;
+
+              // schema:duration
+            case "schema:duration":
+              f = fields.getField("duration");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // phaidra:systemTag
+            case "phaidra:systemTag":
+              f = fields.getField("system-tag");
+              for (j = 0; j < value[i].length; j++) {
+                f.value = value[i];
+              }
+              components.push(f);
+              break;
+
+              // pages, handled insisde rdau:P60193 or rdau:P60101
+            case "schema:pageStart":
+            case "schema:pageEnd":
+              // noop
+              break;
+
+            default:
+
+              // role
+              //ISA off
+              /*if (key.startsWith("role")) {
+                let role = value[i];
+                if (
+                  options &&
+                  options["role"] &&
+                  options["role"]["component"] &&
+                  options["role"]["component"] === "p-entity"
+                ) {
+                  f = fields.getField("role");
+                } else {
+                  f = fields.getField("role-extended");
+                }
+                f.role = key;
+                f.type = role["@type"];
+                if (role["@type"] === "schema:Person") {
+                  if (role["schema:name"]) {
+                    for (let name of role["schema:name"]) {
+                      f.name = name["@value"];
+                      f.showname = true;
+                    }
+                  }
+                  if (role["schema:familyName"]) {
+                    for (let lastname of role["schema:familyName"]) {
+                      f.lastname = lastname["@value"];
+                    }
+                  }
+                  if (role["schema:givenName"]) {
+                    for (let firstname of role["schema:givenName"]) {
+                      f.firstname = firstname["@value"];
+                    }
+                  }
+                  if (role["skos:exactMatch"]) {
+                    for (let id of role["skos:exactMatch"]) {
+                      f.identifierType = id["@type"];
+                      f.identifierText = id["@value"];
+                    }
+                  }
+                  if (role["schema:affiliation"]) {
+                    for (let af of role["schema:affiliation"]) {
+                      if (af["skos:exactMatch"]) {
+                        for (let id of af["skos:exactMatch"]) {
+                          if (id.startsWith("https://pid.phaidra.org/")) {
+                            f.affiliationType = "select";
+                            f.affiliation = id;
+                          } else {
+                            f.affiliationType = "other";
+                            if (af["schema:name"]) {
+                              for (let name of af["schema:name"]) {
+                                f.affiliationText = name["@value"];
+                              }
+                            }
+                          }
+                        }
+                      } else {
+                        if (af["schema:name"]) {
+                          f.affiliationType = "other";
+                          for (let name of af["schema:name"]) {
+                            f.affiliationText = name["@value"];
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+                if (role["@type"] === "schema:Organization") {
+                  if (role["skos:exactMatch"]) {
+                    for (let id of role["skos:exactMatch"]) {
+                      if (id.startsWith("https://pid.phaidra.org/")) {
+                        f.organizationType = "select";
+                        f.organization = id;
+                      } else {
+                        f.organizationType = "other";
+                        f.identifierText = id;
+                        if (role["schema:name"]) {
+                          for (let name of role["schema:name"]) {
+                            f.organizationText = name["@value"];
+                          }
+                        }
+                      }
+                    }
+                  } else {
+                    if (role["schema:name"]) {
+                      for (let name of role["schema:name"]) {
+                        f.organizationText = name["@value"];
+                      }
+                    }
+                  }
+                }
+                components.push(f);
+              } else {
+                // unknown predicate
+                f = fields.getField("readonly");
+                f.jsonld = value[i];
+                f.predicate = key;
+                f.label = key;
+                components.push(f);
+              }*/
+              components.push({});
+              break;
+          }
+        }
+      }
+    });
+
+    return components;
+  },
+  getOrderedComponents: function (components) {
+    var predicateOrder = fields.getPredicateOrder();
+    var ordered = [];
+    var i;
+    var j;
+    for (i = 0; i < predicateOrder.length; i++) {
+      for (j = 0; j < components.length; j++) {
+        if (components[j].predicate === predicateOrder[i]) {
+          ordered.push(components[j]);
+        }
+      }
+    }
+    for (j = 0; j < components.length; j++) {
+      if (components[j].component === "p-unknown-readonly") {
+        ordered.push(components[j]);
+      }
+    }
+    return ordered;
+  },
+  json2form: function (jsonld, options) {
+    var levels = {
+      digital: {
+        components: []
+      }
+    };
+
+    levels.digital.components = this.json2components(jsonld, options);
+
+    Object.entries(jsonld).forEach(([key, value]) => {
+      var i;
+
+      if (key === "dcterms:subject") {
+        levels["subject"] = [];
+        for (i = 0; i < value.length; i++) {
+          if (value[i]["@type"] === "phaidra:Subject") {
+            var subcomp = this.json2components(value[i], options);
+            if (subcomp.length > 0) {
+              levels.subject.push({
+                components: subcomp
+              });
+            }
+          }
+        }
+      }
+    });
+
+    var form = {
+      sections: []
+    };
+    console.log(
+      "this.getOrderedComponents(levels.digital.components)",
+      levels.digital.components
+    );
+    var digitalFields = this.getOrderedComponents(levels.digital.components);
+
+    form.sections.push({
+      title: "General metadata",
+      id: 1,
+      fields: digitalFields
+    });
+
+    if (levels["subject"]) {
+      for (var i = 0; i < levels.subject.length; i++) {
+        var subjectFields = this.getOrderedComponents(
+          levels.subject[i].components
+        );
+        form.sections.push({
+          title: "Subject",
+          type: "phaidra:Subject",
+          id: "subject-" + i,
+          fields: subjectFields
+        });
+      }
+    }
+
+    return form;
+  },
+
   get_json_dce_title(type, title, subtitle, language) {
     var h = {
       "@type": type,
-      "bf:mainTitle": [
-        {
-          "@value": title
-        }
-      ]
+      "bf:mainTitle": [{
+        "@value": title
+      }]
     };
     if (language) {
       h["bf:mainTitle"][0]["@language"] = language;
     }
     if (subtitle) {
-      h["bf:subtitle"] = [
-        {
-          "@value": subtitle
-        }
-      ];
+      h["bf:subtitle"] = [{
+        "@value": subtitle
+      }];
       if (language) {
         h["bf:subtitle"][0]["@language"] = language;
       }
@@ -162,18 +1364,14 @@ export default {
       "@type": type
     };
     if (firstname) {
-      h["schema:givenName"] = [
-        {
-          "@value": firstname
-        }
-      ];
+      h["schema:givenName"] = [{
+        "@value": firstname
+      }];
     }
     if (lastname) {
-      h["schema:familyName"] = [
-        {
-          "@value": lastname
-        }
-      ];
+      h["schema:familyName"] = [{
+        "@value": lastname
+      }];
     }
     if (institution) {
       h["schema:affiliation"] = [];
@@ -182,11 +1380,9 @@ export default {
       }
     }
     if (email) {
-      h["schema:email"] = [
-        {
-          "@value": email
-        }
-      ];
+      h["schema:email"] = [{
+        "@value": email
+      }];
     }
     if (orcid) {
       h["skos:exactMatch"] = orcid;
@@ -200,11 +1396,9 @@ export default {
     };
 
     if (description) {
-      h["skos:prefLabel"] = [
-        {
-          "@value": description
-        }
-      ];
+      h["skos:prefLabel"] = [{
+        "@value": description
+      }];
       if (descriptionLanguage) {
         h["skos:prefLabel"][0]["@language"] = descriptionLanguage;
       }
@@ -217,11 +1411,9 @@ export default {
     };
 
     if (description) {
-      h["skos:prefLabel"] = [
-        {
-          "@value": description
-        }
-      ];
+      h["skos:prefLabel"] = [{
+        "@value": description
+      }];
       if (descriptionLanguage) {
         h["skos:prefLabel"][0]["@language"] = descriptionLanguage;
       }
@@ -241,21 +1433,17 @@ export default {
     };
 
     if (name) {
-      h["skos:prefLabel"] = [
-        {
-          "@value": name
-        }
-      ];
+      h["skos:prefLabel"] = [{
+        "@value": name
+      }];
       if (nameLanguage) {
         h["skos:prefLabel"][0]["@language"] = nameLanguage;
       }
     }
     if (description) {
-      h["rdfs:comment"] = [
-        {
-          "@value": description
-        }
-      ];
+      h["rdfs:comment"] = [{
+        "@value": description
+      }];
       if (descriptionLanguage) {
         h["rdfs:comment"][0]["@language"] = descriptionLanguage;
       }
@@ -286,11 +1474,9 @@ export default {
     if (title) {
       let tit = {
         "@type": "bf:Title",
-        "bf:mainTitle": [
-          {
-            "@value": title
-          }
-        ]
+        "bf:mainTitle": [{
+          "@value": title
+        }]
       };
       if (titleLanguage) {
         tit["bf:mainTitle"][0]["@language"] = titleLanguage;
@@ -332,21 +1518,17 @@ export default {
     if (title) {
       let tit = {
         "@type": "bf:Title",
-        "bf:mainTitle": [
-          {
-            "@value": title
-          }
-        ]
+        "bf:mainTitle": [{
+          "@value": title
+        }]
       };
       if (titleLanguage) {
         tit["bf:mainTitle"][0]["@language"] = titleLanguage;
       }
       if (subtitle) {
-        tit["bf:subtitle"] = [
-          {
-            "@value": subtitle
-          }
-        ];
+        tit["bf:subtitle"] = [{
+          "@value": subtitle
+        }];
         if (titleLanguage) {
           tit["bf:subtitle"][0]["@language"] = titleLanguage;
         }
@@ -358,25 +1540,19 @@ export default {
         "@type": "schema:Person"
       };
       if (firstname) {
-        r["schema:givenName"] = [
-          {
-            "@value": firstname
-          }
-        ];
+        r["schema:givenName"] = [{
+          "@value": firstname
+        }];
       }
       if (lastname) {
-        r["schema:familyName"] = [
-          {
-            "@value": lastname
-          }
-        ];
+        r["schema:familyName"] = [{
+          "@value": lastname
+        }];
       }
       if (name) {
-        r["schema:name"] = [
-          {
-            "@value": name
-          }
-        ];
+        r["schema:name"] = [{
+          "@value": name
+        }];
       }
       h[role] = [r];
     }
@@ -389,22 +1565,18 @@ export default {
     if (publisherName) {
       let pn = {
         "@type": "schema:Organization",
-        "schema:name": [
-          {
-            "@value": publisherName
-          }
-        ]
+        "schema:name": [{
+          "@value": publisherName
+        }]
       };
       h["bf:agent"] = [pn];
     }
     if (publishingPlace) {
       let pp = {
         "@type": "schema:Place",
-        "skos:prefLabel": [
-          {
-            "@value": publishingPlace
-          }
-        ]
+        "skos:prefLabel": [{
+          "@value": publishingPlace
+        }]
       };
       h["bf:place"] = [pp];
     }
@@ -419,11 +1591,9 @@ export default {
       "@type": "aaiso:Programme"
     };
     if (name) {
-      h["skos:prefLabel"] = [
-        {
-          "@value": name
-        }
-      ];
+      h["skos:prefLabel"] = [{
+        "@value": name
+      }];
       if (nameLanguage) {
         h["skos:prefLabel"][0]["@language"] = nameLanguage;
       }
@@ -439,11 +1609,9 @@ export default {
     };
 
     if (name) {
-      h["skos:prefLabel"] = [
-        {
-          "@value": name
-        }
-      ];
+      h["skos:prefLabel"] = [{
+        "@value": name
+      }];
       if (nameLanguage) {
         h["skos:prefLabel"][0]["@language"] = nameLanguage;
       }
@@ -511,7 +1679,7 @@ export default {
           jsonldid = "member_" + k;
 
           jsonlds[jsonldid] = {};
-          //console.log("nfile i", jsonldid, k, s);
+
           this.fields2jsonFile(jsonlds[jsonldid], k, s);
         }
       } else {
@@ -523,7 +1691,7 @@ export default {
       //this.fields2json(jsonlds[jsonldid], s);
     }
 
-    Object.keys(jsonlds).forEach(function(key) {
+    Object.keys(jsonlds).forEach(function (key) {
       if (key.startsWith("subject-")) {
         if (Object.keys(jsonlds[key]).length > 1) {
           if (!jsonlds["container"]["dcterms:subject"]) {
@@ -560,7 +1728,7 @@ export default {
       }
     }
 
-    Object.keys(jsonlds).forEach(function(key) {
+    Object.keys(jsonlds).forEach(function (key) {
       if (key.startsWith("subject-")) {
         if (Object.keys(jsonlds[key]).length > 1) {
           if (!jsonlds["dcterms:subject"]) {
@@ -607,7 +1775,7 @@ export default {
             );
           }
           break;
-        // dates
+          // dates
         case "date":
         case "dcterms:date":
         case "dcterms:created":
@@ -682,7 +1850,10 @@ export default {
               jsonld,
               f.predicate,
               this.get_json_object(
-                [{ "@value": f.value, "@language": f.language }],
+                [{
+                  "@value": f.value,
+                  "@language": f.language
+                }],
                 null,
                 "skos:Concept"
               )
@@ -692,11 +1863,8 @@ export default {
 
         case "dcterms:subject":
           if (f.value) {
-            if (f.type === "skos:Concept") {
-              //replace f.type for keeping track of categories
+            if (f.component === "ext-service") {
 
-              //this is to take care of the fact that the getChildren response has still
-              //detailed info we do not want sent to phaidra
               for (var k = 0; k < f.value.length; k++) {
                 if (typeof f.value[k] !== "undefined") {
                   if (f.value[k].geneName) {
@@ -733,40 +1901,28 @@ export default {
                     delete f.value[k]["@hierarchicalAncestors"];
                   }
 
-                  if (f.value[k]["@type"]) {
-                    //this is to keep track of voc (which field)
-                    //console.log("type here", f.value[k]["@type"], f);
-                    if (f.component === "selection") {
-                      //console.log("selection");
-                    } else {
-                      //we do this only for the ones where component in not "selection",
-                      f.value[k]["@type"] = f.subjectType;
-                    }
-                  }
+                  f.value[k]["@type"] = f.type;
+
                   this.push_object(jsonld, f.predicate, f.value[k]);
                 }
               }
+            } else if (f.component === "selection") {
+
+
+              for (var m = 0; m < f.value.length; m++) {
+                this.push_object(jsonld, f.predicate, f.value[m]);
+              }
+
             } else {
+
               this.push_object(
                 jsonld,
                 f.predicate,
-                this.get_json_concept([f.value], "", f.subjectType, "", "")
+                this.get_json_concept([f.value], "", f.type, "", "")
               );
             }
           }
-          /* if (f.type === "skos:Concept" && f.value) {
-            this.push_object(
-              jsonld,
-              f.predicate,
-              this.get_json_concept(
-                f["skos:prefLabel"],
-                f["rdfs:label"],
-                "skos:Concept",
-                [f.value],
-                f["skos:notation"] ? [f["skos:notation"]] : null
-              )
-            );
-          }*/
+
 
           break;
 
@@ -817,12 +1973,10 @@ export default {
           if (f.value) {
             var mycontent = {
               "@type": "skos:Concept",
-              "skos: prefLabel": [
-                {
-                  "@value": "container",
-                  "@language": "eng"
-                }
-              ],
+              "skos: prefLabel": [{
+                "@value": "container",
+                "@language": "eng"
+              }],
               "skos: exactMatch": [
                 "https://pid.phaidra.org/vocabulary/8MY0-BQDQ"
               ]
@@ -866,12 +2020,6 @@ export default {
             this.push_literal(jsonld, f.predicate, f.fileName[i - 1]);
           }
           if (f.fileDescription[i - 1]) {
-            //console.log(
-            //  "predicate",
-            //  f.fileDescription[i - 1],
-            //  "now",
-            //  this.get_json_general_description(f.fileDescription[i - 1], "eng")
-            //);
             this.push_object(
               jsonld,
               "bf:note",
@@ -888,9 +2036,13 @@ export default {
           if (f.fileFormat[i - 1]) {
             this.push_literal(jsonld, "dcterms:type", f.fileFormat[i - 1]);
           }
+
+          if (f.fileLicense[i - 1]) {
+            this.push_literal(jsonld, "edm:rights", f.fileLicense[i - 1]);
+          }
           break;
       }
     }
     return jsonld;
   }
-};
+};
\ No newline at end of file