This morning I was experimenting with the mmlsk-customfld.mv file. Some time back the custom fields were expanded to allow for data longer than 254 characters. If less than 254 the data goes into a text field and if longer, into a memo field. Unfortunately the admin interface was not changed. So while you might have 5000 characters of narrative, you have a single line input 40 characters long to type into. While it allows you to type whatever you want, you can only see 40 characters at a time. So I figured I'd remedy that. I used the mmlsk-customfld.mv in the source kit. I modified the "module_(category, product, and customer)_content functions. I changed
<input type="text" size=40 name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" value="{ encodeentities( g.CFM_Fields[ l.pos ]:value ) }">
to
<MvIF EXPR = "{len(g.CFM_Fields[ l.pos ]:value) GT 40}">
<textarea name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" rows="5" cols="40"><MvEVAL EXPR = "{encodeentities( g.CFM_Fields[ l.pos ]:value )}"></textarea>
<MvELSE>
<input type="text" size=40 name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" value="{ encodeentities( g.CFM_Fields[ l.pos ]:value ) }">
</MvIF>
and the module code from mmlsk-customfld.mv to customfld.mv. Then saved the file, compiled and updated. The admin interface looked MUCH MUCH better and I was able to grasp what I was typing by seeing multiple lines at once.
So then I went to merchant.mvc to make sure all was well. To my dismay, the product screen, which should have displayed custom field data, locked up with no error message. So I FTPd the pre-edit module to the server and all was well again. The data did not get damaged but there appears to be a bug in one of the functions in the source kit module.
1) Could you check the source kit file for errors to make sure this edit is possible and does not damage the runtime merchant.mvc?
2) Could you implement this change as everybody could benefit from this easier to read and edit screen?
<input type="text" size=40 name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" value="{ encodeentities( g.CFM_Fields[ l.pos ]:value ) }">
to
<MvIF EXPR = "{len(g.CFM_Fields[ l.pos ]:value) GT 40}">
<textarea name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" rows="5" cols="40"><MvEVAL EXPR = "{encodeentities( g.CFM_Fields[ l.pos ]:value )}"></textarea>
<MvELSE>
<input type="text" size=40 name="{ 'CFM_Fields[' $ l.pos $ ']:value' }" value="{ encodeentities( g.CFM_Fields[ l.pos ]:value ) }">
</MvIF>
and the module code from mmlsk-customfld.mv to customfld.mv. Then saved the file, compiled and updated. The admin interface looked MUCH MUCH better and I was able to grasp what I was typing by seeing multiple lines at once.
So then I went to merchant.mvc to make sure all was well. To my dismay, the product screen, which should have displayed custom field data, locked up with no error message. So I FTPd the pre-edit module to the server and all was well again. The data did not get damaged but there appears to be a bug in one of the functions in the source kit module.
1) Could you check the source kit file for errors to make sure this edit is possible and does not damage the runtime merchant.mvc?
2) Could you implement this change as everybody could benefit from this easier to read and edit screen?