there is no problem to prefill normal fields, but i am not able to prefill one or more checkboxes neither with typoscript nor via GET-Parameter.
i tried:
GET-Parameter:
&tx_powermail_pi1[field][marker][0]=1
&tx_powermail_pi1[field][marker][0]=1
Typoscript:
marker = TEXT
marker.value = 1
marker.0 = TEXT
marker.0.value = 1
is there a passibility to prefill /preselect a checkbox?
Thanks!
OK, i got it after analysing the PrefillMultiFieldViewHelper ... :-)
I changed the definition of the labels of my checkboxes in the flexbox:
Option|1
Other Option|2
Now i can prefill my checkboxes with:
&tx_powermail_pi1[field][marker][]=1&tx_powermail_pi1[field][marker][]=2
Easy when you got the logic behind it :-)
Sorry for the noise!
Related
I try to read a flexform data out in typoscript. I tried it with several approaches, but none of them works correctly:
ajax.30 = TEXT
ajax.30.value = {$plugin.parser.settings.maxNumber}
ajax.40 < {$plugin.parser.settings.maxNumber}
ajax.50 < {$plugin.parser.settings.maxNumber}
ajax.60 = TEXT
ajax.60.data = {$field:flexform_varNum}
ajax.70 = TEXT
ajax.70.data = flexform : pi_flexform:settings.varNum
Can anyone give me a hint for the right syntax?
I'm using Typo3 9.5.13.
It is not possible to read out FlexForm data without an actual content element.
The CONTENT or COA objects would provide that. See for example Get FlexForm configuration in TypoScript
The feature was added in TYPO3 8.4 https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.4/Feature-17309-AccessFlexformValueViaTS.html
Is there some way how to hide specific elements on specific page using Typoscript in TYPO3?
The URL is for example: www.mywebsite.com/subpage1
I want to hide menu and footer part only on this subpage1.
Thank you
If the menu and footer are created through TypoScript you can use conditions in TypoScript to overwrite them. For example:
lib.footer = TEXT
lib.footer.value = This is my footer
[globalVar = TSFE:id = 4]
lib.footer >
[global]
In this example the uid of the page where I want to not show the footer is 4.
More on conditions in TypoScript can be found here: https://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference.html
A clean way would be to define different page-layouts and assign them to the pages where these elements are not desired. With fluid partials you could recycle most parts of the page and depending on the layout render footer and menu.
As you get a nice inheritance mostly the fields backend_layout and backend_layout_next_level are used. You will find a lot of examples.
fluid handling could be found in typoscript backend_layout_next_level not working.
For templa voila (=TV) you can use a similar attempt: select different TV-templates depending on these fields.
Duplicate the given template, remove footer and menu and insert the new template to the set of given templates.
Using Typo3 8.7.4/Powermail 3.21.2
I'm pretty new to Typo3, so I have no clue if this is even the right way to do it, but heres my problem:
On the site there are several subpages with images/descriptions of articles on them. Every article has an UID stored in the image title (dont ask me why).
When an image is clicked it links to another page with a powermail mailform.
In this form there's a textfield for the UID which should automatically fill with the UID in the image title so the user doesn't have to do it manually. That essentially it.
I know you can prefill a field with a value or placeholder, but should I even use a textfield or use TS instead?
And what should I add to the image link for the UID to get posted to the form?
Or am I doing this completely wrong?
All help appreciated, thank you and have a nice day!
You can Do like This.
plugin.tx_powermail.settings.setup.prefill {
position = CONTENT // Here Position is your powermail form fields
position {
table = Your tables
select {
selectFields = title
andWhere.data = GP:title // Pass your url parameters
andWhere.wrap = uid=|
pidInList = 108 // Added Your Pid
}
renderObj = TEXT
renderObj.field = title
}
}
There are several ways of prefilling form fields in powermail (look at the manual https://docs.typo3.org/typo3cms/extensions/powermail/ForAdministrators/BestPractice/PrefillField/Index.html) and I would say that there is no wrong way. Just choose the right one for your needs.
I have a list in tt_news and use many folders with tt_news records. I want to use a different template in this list when I filter and display specific category.
My Typoscript is:
[globalVar = GP:tx_ttnews|place|0 = 79]
#Display list of specific category
plugin.tt_news.templateFile = fileadmin/templates/plugins/tt_news/different.html
[else]
#General display list
plugin.tt_news.templateFile = fileadmin/templates/plugins/tt_news/general.html
[end]
I have used plugin.tt_news.templateFile and plugin.tt_news.file.templateFile but don't work. I am using the last version of tt_news and TYPO3 6.2
"plugin.tt_news.templateFile" is right, i think there is a problem in "[globalVar = GP:tx_ttnews|place|0 = 79]" you should close global with "[global]" instead of "[end]". Try this if it is helpful to you.
For the Typoscript way did not resolve this, I do not why? For we needed we have use a category and marker in the template of tt_news and create a logic in frontend through JS for resolve this.
I'm using typo3 6.2.4 and powermail 2.0.16
I need to create a form who send a mail to me.
I created the form with the page and the fields. One is the name and one is the mail to test.
After, I created the content element with the plugin powermail and now, I need to display the form in the frontend. I have active the static "Main Template" and "Add basic CSS". I try this code but it's not working.
page = PAGE
page.10 = CONTENT
page.10.table = tt_content
page.10.select {
where = colPos = 0
orderBy = sorting
}
page.10.renderObj = COA
page.10.renderObj {
10 = TEXT
10.field = header
10.wrap = <div class="header">|</div>
20 = TEXT
20.field = bodytext
20.wrap = <div class="bodytext">|</div>
}
Can you help me?
The answer is here : Nothing appears in Typo3 with powermail (Frontend)
It seems that you are missing the proper typoscript to actually show the form on the page. The specified typoscript snippet is not enough to show the content elements on the page.
Inside your typoscript template include the css_styled_content static template and change the snippet to this:
# Default PAGE object:
page = PAGE
page.10 < styles.content.get
That should ensure proper showing on the frontend. This is basic as it is, if you want it to be better looking, or different templating you should take a look at templating with TYPO3 first.
Just thinking with you here, did you add this as a template in the typoscript template configuration? Like