1955 Posts in 1234 Topics by 601 members
|Go to End|
4 February 2010 at 10:18am
sorry my noob question but I do not understand why not see in template LiteralField.
- create class MyForm
- create template in "include" folder
- use $dataFieldByName(nameLiteralField) or $nameLiteralField but nothing include in my template
DropdownField, TextField and etc normal include in template
5 February 2010 at 2:04pm
i think i'm use not right method anyone can help me?
i'm find in \sapphire\forms\FieldSet.php function collateDataFields() if set $isIncluded = true;($field->hasData() return false is my problem) LiteralField work, but not good variants
7 May 2010 at 4:55am
I ran into the same problem. Every other field i needed works perfectly with $dataFieldByName(Name), but not LiteralField. Any one has a good solution?
18 January 2011 at 7:23pm Last edited: 18 January 2011 7:25pm
Unless I'm missing something this seems to have been overlooked in the Form class. While there is a method to access all Data fields:
This function returns all fields with data and will not return literals, headings etc.
With a little creativity it is possible to circumvent the functions in the Form class and access the FieldHolder method from the FieldSet directly for these fields in your custom form template via:
<!-- In customformtemplate.ss -->
Hope that helps!
28 February 2011 at 5:07am
This worked for me...
|Go to Top|