Phpcms V9 in the custom field supports image upload and multi-image upload, but after the film is not visible, because TA directly output the array, not compiled!
To display its uploaded images directly in the form, you just need to modify the form's template, and here are the modified files and related code:
First find the page template for the form, ". /phpcms/modules/formguide/templates/formguide_info_view.tpl.php", open and edit!
<?php if (Is_array ($forminfos _data)) {foreach ($forminfos _data as $key = + $form) {?> <tr> <td>< php echo $fields [$key] [' name ']?>:</td> <td>< php echo $form? ></TD&G T </tr> <?php}}?>
Replace it with the following:
<?php foreach ($forminfos _data as $key => $val): ?> <tr> <?php if (Is_array ($val) && $key === ' IMGs '): ?> <td><?php echo $fields [$key] [' name '] ?>: </td> <td><?php foreach ($val as $v): ?> <a href= "<?php echo $v [' url '] ?> " target=" _blank " ></td> <?php else: ?> <td><?php echo $fields [$key] [' Name '] ?>:</td> <td><?php echo $val ?></td> <?php endif&nBSP;? > </tr> <?php endforeach ?>
Effect:
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/96/A8/wKiom1kkEHDgKwgjAABGxI9b-y8820.jpg-wh_500x0-wm_ 3-wmp_4-s_1118369302.jpg "title=" qq20170523183419.jpg "alt=" Wkiom1kkehdgkwgjaabgxi9b-y8820.jpg-wh_50 "/>
This article is from the "jack_phpcms" blog, make sure to keep this source http://maifang158.blog.51cto.com/5433990/1928753
Phpcms V9 Submit a multi-plot field in the foreground custom form