23 Posts
cassirer
1 year ago
1
Topic

Dear Sebloders,

I'm too dump and hope, that somebody can help me. Since its not possible to set the ranking for the concatenate, I purchased the code pack for the before store plugin and I'm not able to use it. You could somebody please explain how I can combine the values from the fields "textauswahl" (select simple) and "datum" (picker calendar) in the art_title so the value of art_tile would be value"textauswahl"-value"datum"?

Thanks a lot in advance, Cassirer

I of course saw this: https://www.seblod.com/resources/tutorials/using-code-pack but I don' get it

Get a Book for SEBLOD
1 year ago
0
Level 1

Hi,

Certainly too late, but here's some code that should do the job. All the fields, including 'art_ttitle' must be in the form to be available in the $fields array :

// Set title value

$title =$fields['textauswahl']->value . '-' . $fields['datum']->value;

//Affect title value to 'art_title' field

JCckDevField::updateValue( 'beforeStore', 'art_title', $title, $fields, $config );

Get a VIP membership