[TYPO3-english] Passing/Assigning/Inserting $GET GPvar to TS Form

bernd wilke t3ng at bernd-wilke.net
Thu Apr 2 10:23:49 CEST 2015


Am 02.04.15 um 01:07 schrieb Scotty C:
> Hi again everyone,
> I know that if I havePHP: $GET['test'] = "hello"
> ...andpage.10 = TEXTpage.10.data = GP : temp_name
> ... then output will be "hello"
> My problem is, I need to insert that $GET value into an un-edittable form field.
> After looking at TS Ref and seeing that dataArray elements in a form possess stdWrap properties, my kneejerk reaction was to do:
> page.30 = FORMpage.30 {  dataArray {    30.label = Test Value:
>      30.value = {GP : test}     30.stdWrap.insertData = 1  } # end dataArray  recipient = info at example.com  layout = <div class="some-class">###LABEL### ###FIELD###</div>}
> ... but that results in the literal string "{GP : test}" being output after "Test Value:"
> Can anybody tell me how to slap that $GET value into the form field, and then make that field visible but un-edittable?
> Thanks as always!-Scott.
>
How do you manage to deliver all your code so unformatted?
it is real pain to always reformat it to get an idea of your problem.

 > I know that if I have
PHP: $GET['test'] = "hello"
 > ...and
page.10 = TEXT
page.10.data = GP : temp_name
 > ... then output will be "hello"
 > My problem is, I need to insert that $GET value into an un-edittable 
form field.
 > After looking at TS Ref and seeing that dataArray elements in a form 
possess stdWrap properties, my kneejerk reaction was to do:
page.30 = FORM
page.30 {
	dataArray {
		30.label = Test Value:
		30.value = {GP : test}
		30.stdWrap.insertData = 1
	}
	# end dataArray
	recipient = info at example.com
	layout = <div class="some-class">###LABEL### ###FIELD###</div>
}

dataArray.30 is no TEXT object, so your stdWrap will not work in the 
same way than on your TEXT object (page.10). see [1]

I don't know exactly, but you may try something like:

30.value.data = GP:test
or
30.value.cObject = TEXT
30.value.cObject.data = GP:test
or
30.value = {GP:test}
30.value.insertData = 1




[1] 
http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Form/Index.html



bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list