File tree Expand file tree Collapse file tree 4 files changed +11
-14
lines changed
Expand file tree Collapse file tree 4 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -746,12 +746,7 @@ export default function decorate(block) {
746746 const data = Array . isArray ( raw ) ? raw : ( raw ?. fields && Array . isArray ( raw . fields ) ? raw . fields : null ) ;
747747 if ( ! data || ! Array . isArray ( data ) ) throw new Error ( `No form fields at ${ source } ` ) ;
748748 const form = buildForm ( data , submit ) ;
749- const configRow = block . querySelector ( ':scope > div' ) ;
750- if ( configRow ) {
751- block . replaceChildren ( configRow , form ) ;
752- } else {
753- block . replaceChildren ( form ) ;
754- }
749+ block . replaceChildren ( form ) ;
755750 block . removeAttribute ( 'style' ) ;
756751 } catch ( error ) {
757752
Original file line number Diff line number Diff line change 174174 "fields" : [
175175 {
176176 "name" : " source" ,
177- "selector" : " div:nth-child(1)>div>p "
177+ "selector" : " div:nth-child(1)>div>a[href] "
178178 },
179179 {
180180 "name" : " actionUrl" ,
181- "selector" : " div:nth-child(2)>div>p "
181+ "selector" : " div:nth-child(2)>div>a[href] "
182182 }
183183 ]
184184 }
Original file line number Diff line number Diff line change 257257 "id" : " form" ,
258258 "fields" : [
259259 {
260- "component" : " richtext " ,
260+ "component" : " reference " ,
261261 "name" : " source" ,
262262 "label" : " Form Source URL" ,
263263 "valueType" : " string" ,
264+ "multi" : false ,
264265 "required" : true ,
265266 "description" : " URL to the JSON form definition"
266267 },
267268 {
268- "component" : " richtext " ,
269+ "component" : " text " ,
269270 "name" : " actionUrl" ,
270271 "label" : " Submit Endpoint" ,
271272 "valueType" : " string" ,
Original file line number Diff line number Diff line change 1010 "rows" : 2 ,
1111 "columns" : 1 ,
1212 "fields" : [
13- { "name" : " source" , "selector" : " div:nth-child(1)>div>p " },
14- { "name" : " actionUrl" , "selector" : " div:nth-child(2)>div>p " }
13+ { "name" : " source" , "selector" : " div:nth-child(1)>div>a[href] " },
14+ { "name" : " actionUrl" , "selector" : " div:nth-child(2)>div>a[href] " }
1515 ]
1616 }
1717 }
2222 "id" : " form" ,
2323 "fields" : [
2424 {
25- "component" : " richtext " ,
25+ "component" : " reference " ,
2626 "name" : " source" ,
2727 "label" : " Form Source URL" ,
2828 "valueType" : " string" ,
29+ "multi" : false ,
2930 "required" : true ,
3031 "description" : " URL to the JSON form definition"
3132 },
3233 {
33- "component" : " richtext " ,
34+ "component" : " text " ,
3435 "name" : " actionUrl" ,
3536 "label" : " Submit Endpoint" ,
3637 "valueType" : " string" ,
You can’t perform that action at this time.
0 commit comments