Hi,
How can i save my custom fields like check box, combo boxes and text-fields in database using in "New Article". I have two check boxes right now and i want to save value of them in database. These check boxes are added in form using create.js (assests/components/articles/js/article/create.js) using following code:
{
xtype: 'xcheckbox'
,name: 'breakingNews'
,fieldLabel: "Breaking News"
,id: 'breaking-news'
,value: 1
,checked:false
},
{
xtype: 'xcheckbox'
,name: 'liveNews'
,fieldLabel: "Live News"
,id: 'live-news'
,value: 1
,checked:false
},
Please check attachment...
Thnx
can't you just use checkbox - Template-Variables here?
Can you write steps and files where i change and save data on submission of form... cause i have problem in saving to db...
thnx
-
☆ A M B ☆
- 24,524 Posts
What Bruno was saying is, instead of modifying the article's editing form, just use a TV. Or I was thinking, just use a tag, since that is already part of the form.
@sottwell ,
Kindly check attachment, may it helps....
-
☆ A M B ☆
- 24,524 Posts
Yes, I know. The question is, do you need to actually create new fields in the form and in the database? And, of course, such modification of the Articles extra means you would have a problem any time you upgrade.
Instead, you could use a TV. Or, you could use the existing Tags field. A tag of "breaking" and/or "live" would do the trick. Use it in the output listing snippets like any other tag, or TV filter if you were using a TV.
Ok I am trying, actually the requirement is , when any article is post if admin checked "Breaking NEWS" then that article will show as breaking news, i have created fields in table with news_flag breaking_news=1 and live_news=2,
So, when i submit my form, i want these values set again that column. That is requirement.
Can you track me files or location where i should apply changes?
Thnx