Jump to content

GavJMF

Members
  • Posts

    2
  • Joined

  • Last visited

GavJMF's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Essentially whenever I had named the repeater field as 'card_repeater1' & the repeater's individual items would not open unless i turned off ajax for that field. No error came up in the log initially, however if I had a TinyMCE textarea in the field it came up with the error: 'Cannot find element to init TinyMCE: #Inputfield_textfield1_repeater1039' 'textfield1' being the name of the tinymce field. After some trial and error it seems to be only when the name ends in '_repeater' or the same with any combination of numbers added to the end. Not really a major issue but thought it was due a mention as I couldnt find anything on this, though admittedly I may have missed a mention of this in the docs. This is solved by simply changing the name to include any text after the underscore, i.e. 'cardrepeater1' works fine or 'card_1repeater'. 😁
  2. Hi all, Ive recently been working more with renderfields on a project however im a little stumped with something. When I want to make a file front end editable, is there a way to get the fieldname from within the render file? For example: On this page I have 2 image fields, 'single_image' & 'single_image2' if I was to add a the former to a page I have it set up as below: <?=$page->renderField('single_image','rectangle');?> then the code within 'rectangle' is as follows: <div edit="<?=$page->id;?>.single_image"> <img alt="<?=$value->alt;?>" src="<?=$value->size(600,400)->url;?>"> </div> I wanted to know if there is a way to call the fieldName for the renderField value rather than having to either hard code it with different files, or setting up an array within the renderField. I.e. If I could do something akin to this: <div edit="<?=$page->id;?>.<?=$value->fieldName;?>"> <img alt="<?=$value->alt;?>" src="<?=$value->size(600,400)->url;?>"> </div> Obviously that doesnt work as the value doesn't have the fieldname within it but maybe theres something I've missed? I can work around this by making changes to the template file where the renderField is called but, if possible, I'd like to avoid that.
×
×
  • Create New...