create article title from article ID 54 Postsnzimas 7 years ago11TopicIs it possible to generate the article title from the article ID + a variable text string taken from another field without using the SD Live Field plugin?The output should look like "Request #123 - Blah Blah Blah".I've tried to at least get the article ID from the Live URL Variable modifier, but to no avail. 1281 PostsBucklash 7 years ago10Level 1HiYou need the Afterstore field/plugin.You have no Article ID until it is stored (If editing the article then you can use BeforeStore as ID will be available).Lionel's Tutorial does the trick changing-the-joomla-message-after-a-submission-of-a-seblod-formor go hardcore Joomla:Inserting,_Updating_and_Removing_data_using_JDatabaseBucklashReplied with tutorial(s):Changing the Joomla message after a submission of a SEBLOD form Create from field an alias friendly string How to change the value of a field between the form submission and the storage in database Using Code Pack 54 Postsnzimas 7 years ago9Level 2 Thank you so much for the valuable pointer. I've tried to adapt one of the simplest examples, but it s not doing the job. $name = $fields['art_title']->storage_field; $table = $fields['art_title']->storage_table; $new_value = $config['pk']; $config['storages'][$table][$name] = $new_value; $fields['art_title']->value = $new_value; This same block of code works in the BeforeStore field if $new_value = 'fixed_value';. 83 PostsCAF St Brieuc 7 years ago8Level 3Hello nzimas I use this to change the art_title$config['storages']['#__content']['title']= $new_value;best regardsG.Bob 54 Postsnzimas 7 years ago7Level 4But where do you define $new_value so that it picks the value from art_id? 1281 PostsBucklash 7 years ago6Level 5HiTry:$new_value = $fields->getValue('art_title'); // or getHtml etc 54 Postsnzimas 7 years ago5Level 6Shouldn't it be $new_value = $fields->getValue('art_id'); to get the article id? 1281 PostsBucklash 7 years ago0Level 7SorryYes :) 83 PostsCAF St Brieuc 7 years ago3Level 7Hisee that : http://www.seblod.com/resources/tutorials/changing-the-joomla-message-after-a-submission-of-a-seblod-formAnd use AfterStore process because BeforeStore your id doesn't yet exist !best regards 54 Postsnzimas 7 years ago2Level 8I find the example provided at http://www.seblod.com/resources/tutorials/changing-the-joomla-message-after-a-submission-of-a-seblod-formfar too confusing and not readily adaptable (please understand that my knowledge of PHP is somewhat limited :().In my most recent attempt, i've tried:$new_value = $fields->getValue('art_id'); $config['storages']['#__content']['title']= $new_value;But ended up with a PHP fatal error.Wondering if $config['pk']; must be stated somewhere, as it refers to the unique ID of the content item. 83 PostsCAF St Brieuc 7 years ago1Level 9 hi, ok I make a mistake, you can't do that in afterstore process check here. but you can do that : $blabla = $fields['art_title']->value; $new_value = 'Request #' . $config['pk'] . ' - ' . $blabla; $sql = 'UPDATE #__content SET title="' . $new_value . '" WHERE id=' . $config['pk']; $db = &JFactory::getDBO(); $db->setQuery($sql); $db->query(); Maybe it's not the good way, but it's work 54 Postsnzimas 7 years ago0Level 10@CAF St BrieucThanks a million for your invaluable help! The art_title field is finally taking its value from the pk of the entry.