We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42031
    • 4 Posts
    MODX Revolution 2.2.6-pl - Traditional
    Gallery 1.5.2

    How do you use form customization on GalleryItem Custom TV?

    I would like to be able to hide 'other phpthumb options' and 'watermark options'

    Can this be done with form customization? or do I have to edit the 'GalleryCustomTV' plugin?

    See below
    http://rtfm.modx.com/display/ADDON/Gallery.Setting+Up+the+GalleryItem+TV

    Thanks
    Hope someone can help...
      • 35781
      • 25 Posts
      I dont know the right way to hide this fields, but you can delete it from tv form,
      You should find file
      assets\components\gallery\js\mgr\tv\galtv.js
      This file contains TV form.
      You should delete this:
      ,{
                      xtype: 'textfield'
                      ,id: 'tv'+config.tv+'-gal_other'
                      ,name: 'gal_other'
                      ,fieldLabel: _('gallery.other_opt')
                      ,description: _('gallery.other_opt_desc')
                      ,value: config.data['gal_other'] || ''
                      ,anchor: '97%'
                      ,listeners: {'change':this.syncHidden,scope:this}
                  },{
                      xtype: 'fieldset'
                      ,collapsible: true
                      ,collapsed: true
                      ,autoHeight: true
                      ,title: _('gallery.watermark_options')
                      ,items: [{
                          html: '<p>'+_('gallery.watermark_options_desc')+'</p>'
                          ,border: false
                      },{
                          xtype: 'textfield'
                          ,id: 'tv'+config.tv+'-gal_watermark-text'
                          ,fieldLabel: _('gallery.watermark_text')
                          ,description: _('gallery.watermark_text_desc')
                          ,name: 'gal_watermark-text'
                          ,allowBlank: true
                          ,anchor: '97%'
                          ,value: config.data['gal_watermark-text'] || ''
                          ,listeners: {'change':this.syncHidden,scope:this}
                      },{
                          xtype: 'combo'
                          ,id: 'tv'+config.tv+'-gal_watermark-text-position'
                          ,fieldLabel: _('gallery.watermark_text_position')
                          ,store: [
                              ['BR',_('gallery.pos_br')]
                              ,['BL',_('gallery.pos_bl')]
                              ,['TR',_('gallery.pos_tr')]
                              ,['TL',_('gallery.pos_tl')]
                              ,['C',_('gallery.pos_c')]
                              ,['R',_('gallery.pos_r')]
                              ,['L',_('gallery.pos_l')]
                              ,['T',_('gallery.pos_t')]
                              ,['B',_('gallery.pos_b')]
                          ]
                          ,description: _('gallery.watermark_text_position_desc')
                          ,name: 'gal_watermark-text-position'
                          ,allowBlank: true
                          ,anchor: '97%'
                          ,typeAhead: false
                          ,forceSelection: true
                          ,triggerAction: 'all'
                          ,selectOnFocus: true
                          ,editable: false
                          ,value: config.data['gal_watermark-text-position'] || ''
                          ,listeners: {'select':this.syncHidden,scope:this}
                      }]
                  }
        • 42031
        • 4 Posts
        Great that works smiley thanks.
        Would be good to have more control over it for clients