php - Custom Field of plugin does not update the value when assigned in Joomla Article
Get the solution ↓↓↓Joomla 3.4 Stable Version, Content Plugin
Simply explain the problem > click here
Picture of custom field which assigned '5555' : http://i.stack.imgur.com/5qlsS.png
Expected Output: 5555
Real Output : defaultvalue
Print Output Code
$plugin = JPluginHelper::getPlugin('content', 'signal');
$params = new JRegistry($plugin->params);
echo $params->get('custom_1','default_value');
XML Code
<field name="custom_1"
type="text"
label="Custom Field 1"
/>
Answer
Solution:
From the image it seems that the parameter you try to acess is not in the plugin ,but it is in the article (new field created by plugin) so try to use this code
$params= json_decode($this->item->attribs);
echo $params->custom_1;
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: too few arguments to function laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.