CMSB 3 default field width

5 posts by 3 authors in: Forums > CMS Builder
Last Post: February 9, 2016   (RSS)

By kitsguru - February 5, 2016

I am wondering what the default field withs are in the section editor and if tnere is an easy way to set it for older sections. i am finding going through and manually adjusting each field for all the sections very tedious.

Suggestions?

Jeff Shields

By ross - February 9, 2016

Hi Jeff

Thanks for posting.

I know what you mean about having to changing the field length for each field individually.  

An advanced option you have is modifying the schema file directly.   If you are going to try this, make sure to have backups of both your database (you can use the backup tool in CMS Builder) and the schema file itself.  

When you open the schema file, look for this attribute:

'fieldWidth' => '',

There will be one of these for each text field in your section. Other field types won't have this attribute.

What you can do is a find and replace and change that to any of the following options:

Tiny
Small
Medium
Large
Full Width

Does that all make sense? I recommend asking any questions you have before trying anything.

Keep me up to date with how you are making out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By kitsguru - February 9, 2016

Thanks Ross,

I used my text editor with regexp to replace all unassigned fieldWidth to large as my default, then found ones that had width set to a pixel value and set those to corresponding sizes. Now I only need to adjust a few by hand where large is too big or when full width is desired.

I use git for version control so never need backups as I can always revert the changes for any commit.

Jeff Shields

By ross - February 9, 2016

Hi Jeff

Sounds good Jeff.  Keep me up to date with how you are making out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/