brendo / customfieldcaptions Goto Github PK
View Code? Open in Web Editor NEWAbility to add custom captions to Symphony fields
Ability to add custom captions to Symphony fields
Taken from symphonycms/symphony-2/947, but the idea that captions could be inline, as @placeholder
attributes instead of replacing the "Optional" text (or at least living in the same space)
I'm not sure if I'm missing something, but installing this extension on Symphony 2.2.1 doesn't change anything in the interface but creates this error in the console when browsing the section editor:
TypeError: Result of expression 'data' [undefined] is not an object. customfieldcaptions.sections.js:37
I'm picking on you today...
in the publish JS, the if statement for undefined needs updating to be:
if(isNaN(parseInt(field_id)) || data[field_id].caption == undefined) return;
In some cases, the Publish Tabs extension loads after this one, and therefor your JS errors and breaks the page in 2.2.5
Symphony 2.3beta3 - Fields with empty captions on the sections pages display 'null' in the publish pages
Changing assets/customfieldcaptions.publish.js
line #21 from
if(data[field_id] == undefined) return;
to
if(data[field_id].caption == undefined) return;
seems to fix it
PS - Thanks for all your hard work on Symphony 2.3 - it's looks & feels great!
A long caption require 2 lines or longer will cased overlapping the input fields.
Could this be fix?
If a file upload field is set as required, the caption doesn't show up. As soon as I change the field to optional, the caption displays. It seems to work fine with all other field types.
THANKS!
There seem to be some errors occuring when saving a section that has CFC enabled in 2.3. See this issue and related discussion
After installing custom field caption, the Placement selecbox in the Sections is appear in the middle instead of align to the left.
Could Custom field caption placing at the bottom of the Label field instead to allow writing a long description?
S2.2.5
Windows 7
Google Chrome 17.*
With Sym 2.5 the custom field input shows for some sections but not for others. I have not been able to narrow it down to the presence of a specific field type in the section, but the error thrown follows.
I can grant access to the offending installation if it helps.
[Error] TypeError: 'undefined' is not an object (evaluating 'data[field_id].caption')
(anonymous function) (customfieldcaptions.sections.js, line 65)
each (symphony.min.js, line 14)
each (symphony.min.js, line 14)
(anonymous function) (customfieldcaptions.sections.js, line 56)
k (symphony.min.js, line 24)
fireWith (symphony.min.js, line 24)
ready (symphony.min.js, line 24)
g (symphony.min.js, line 14)
Symphony 2.3 has a reworked Duplicator plugin, but it makes it hard/impossible to listen for the for an event that lets you know a new item has been added.
At the moment, clicking Add Item in 2.3 will not dynamically insert the Caption field. Refreshing the Section Editor will correctly add the field.
Awaiting advice from @nilshoerrmann about to proceed. I did manage to get it working by hacking the plugin to add:
object.trigger('constructstart.duplicator', [instance]);
at Line 105 of the Duplicator plugin, as this allows me to listen to $duplicator.on('constructstart.duplicator')
, but I'm curious if there's a different way to do this.
Escape braces and other HTML stuff when rendering caption.
When this extension is enabled, in the section editor the "Make this a required field" and "Display in entries table" checkboxes are hidden.
Extension version 0.4
Sym version 2.4/2.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.