I am currently using keystoneJS for a project and I have a requirement to allow admins to add additional fields for each deliverable.
I managed to find textarray, which allows me to add a single line of text but I would need something closer to adding textfields as i would need to add paragraphs of text.
Any advise/direction to extending the functionality or is it not possible?
FYI: I also tried using these two resources to no avail, perhaps due to a lack of knowledge on my end.
- https://github.com/keystonejs/keystone/wiki/Create-a-custom-field-type-for-app-development
- https://gist.github.com/JedWatson/8519769
EDIT: i wasnt able to figure out in detail, but changing the arrayfield in mixin to multiline met my use case. Now trying to include two fields in one add.
Related
I am creating a custom module with additional part numbers on a separate tab in the products screen. I have built the module, but am having trouble figuring out how to display the information so it matches the layout in the attached image. I have tried tree view but have not been able to get the fields on the same line. Can this only be accomplished through css or is there a table view that I am not aware of?
I also need to make sure that all of the information in row 1 stays tethered together for additional forms, etc. My plan is to make the field names for each row end with a different number (i.e. x_mfrname1,x_mfrpn1,x_mfrname2,x_mfrpn2, etc.). Can somebody please just tell me if I am on the right track. This is the initial Odoo setup for a client of mine and I don't want them to come back to me down the line and find out I forgot something. I have been scouring the internet and reading a few books but I am not completely confident.
Here is a link to a layout of what I am talking about:
MFG Part Number Tab
Thanks!
class sub_part_details(models.Model)
_name='sub.part.detail'
primary_pn=fields.Boolean('Primary P/N')
obsolete=fields.Boolean('Obsolete')
pn=fields.Char('P/N')
desc=fields.Char('Description')
upgrade=fields.Char('Upgrade')
part_detail_id=fields.Many2one('part.details')
class part_details(models.Model)
_name='part.details'
cat=fields.Char('CAT')
sub_ass=fields.Char('Subassembly')
main_ass=fields.Char('Main Assembly')
notes=fields.Text('Notes')
sub_details_ids=fields.One2Many(''sub.part.detail','part_detail_id')
It might be helpful
I've just installed Flags module and it looks awful when on the bottom I see "Flag this item" link. The only thing I've found in configuration is enabling it to show as normal link. Still I haven't found how to change position of this link. Is it even possible to change link's place? I have installed CCK Blocks but it doesn't give me any option to get rid of it. If someone know or suspect what's possible - please help me.
Try the Display Suite module, this module is integrated with many modules like flag, title etc...
Display Suite allows you to take full control over how your content is displayed using a drag and drop interface. Arrange your
nodes, views, comments, user data etc. the way you want without having
to work your way through dozens of template files. A predefined list
of layouts (D7 only) is available for even more drag and drop fun!
https://drupal.org/project/ds
You can move and generate custom layouts for the fields/properties on the entity display formatter: teaser, full...
I have asked the following question at the Our Umbraco community site also, but I've had no luck there so far.
I've got a task where I need to manually add database records for a media image file, which is to appear in an Umbraco site for our client.
My SQL consists of:
Adding a record in umbracoNode for the image.
Adding a record in cmsContent
Adding a record in cmsContentXml
Adding records to cmsPropertyData for the image's umbracoFile, umbracoWidth, umbracoHeight, umbracoBytes, umbracoExtension
After executing the above, and logging into Umbraco, I can see the image in the Media area and all looks fine.
The problem is the call the #Model.MediaById() (in a Razor file) when I want to display that image - basically no image is displayed since the img 'src' attribute is not set.
I've stepped through the Umbraco code and found the problem. Basically when the code uses Lucene to search for the media (ExaminedBackendMedia.GetUmbracoMedia()), it does find the image file, however there are a number of fields missing for the SearchResult. For example, none of the "umbraco*" properties adde to cmsPropertyData appear in the fields collection. When I step through the code for another image (one that was added manually) I can see an extra 5 or so properties in the fields collection - including all the "umbraco*" properties.
So I can see that I have missing data here. Basically the SearchResult object is missing some fields. Can someone suggest what I may have missed please? Why is Lucene not picking up the "umbraco*" properties that I've added via SQL scripts?
You need to make sure that you republish the nodes, which will take them from the database entries that you created and put them into the XML cache that umbraco actually uses when serving up data.
Sharepoint is quite limited when it comes to multi-Lookups because it saves that information in strings. So I changed the Page-Property
"Elements (MultiLookup-> elementIds" on the propertyPage
to an inserted List "PageElements":
"
(SingleLookup)pageId , (singleLookup) elementId"
Because this is quite hard to maintain for my content admins I want that they can enter that information in the page properties like before instead of adding lines into "PageElements"
Therefore I want to add a control that handles that.
I do not need a solution for the task how to achieve that specific function, but a general hint how to add any custom control into a Page property.
I starting point link would be very nice. I just doen't seem to find the right words to feed google with my topic.
Solved this by using a custom field type with that logic. Basicly Described here: http://avinashkt.blogspot.de/2011/07/creating-custom-field-in-sharepoint.html
Yii framework, yii-user extension (using latest version of both, to date): how do I add a simple "checkbox" field for the profile of all users?
I am logged in as admin, and went to user/profileField/admin. I can add new field but the closest I get to is adding a "BOOL" field which is rendered as a dropdown, while I need a checkbox... . When "BOOL" is used I cannot specify the widget and even if I could, there's no documentation on those yii-user widgets.
Any help is welcome!
Open up modules/yii-user/views/user/registration.php. Around line 40, add something like this:
else if ($field->field_type=='BINARY') echo $form->checkBox($profile,$field->varname,array());
Now when you want to create a checkbox field, choose the BINARY field type. If you want to require that it's checked, add this to the 'Other Validator' field: {"compare":{"compareValue":"1"}}
I've had a look around the docs for that extension and I don't actually see a single checkbox anywhere in the screen shots or mentioned anywhere in the wiki either.
You might be able to dive in and add support for one in the places you need it, Yii nicely handles all the HTML elements so it shouldn't be too hard to add the feature in a primitive form. CHtml::checkBox() or CHtml::checkBoxList().
Then again if your already running into problems with it, it's probably going to be easier in the long run for you to write what you need yourself.