How can i set a value by creating a new row with datas from other fields

How can i set a value by creating a new row with datas from other fields

zerennerzerenner Posts: 16Questions: 6Answers: 0

I have found the preCreat event. I hav put it in the Ajax part. I can set a new value without datas from an other field for example i set the value: 'Inv' . 'JBO'. If i want to set the value with an inputfield (->setValue( 'Inv' . inventory.kd_nr . 'JBO');) i get only an error. inventory.kd_nr is an input in the editor.

I want to set the inventory.pw as setValue( 'Inv' . tag . inventory.kd_nr . 'JBO'). tag is a variable which i write into the hidden field inventory.pw. Can you tell me how i can set the value with individuel text and the value from the field i want change and the value from an other field?

The code is attached because the website is an intranet site.

Thanks for your help.

Dirk

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    ->setValue( 'Inv' .inventory.kd_nr . 'JBO');

    This should be giving a PHP syntax error. I think what you want is:

    ->setValue( 'Inv' .$values['inventory']['kd_nr'] . 'JBO');
    

    Allan

  • zerennerzerenner Posts: 16Questions: 6Answers: 0

    Thank you for your help. That was it .

This discussion has been closed.