Crowcreek VIP
Total posts: 4
21 Сен 2014 15:49

Hi,

I watched the video about how to make a submission form here http://www.mintjoomla.com/blog/item/234-how-to-use-cobalt-as-form-generator.html. I am almost done making changes in my initial attempt to make a submission form. (Fixes based on what I learned in the video.)

My question now, is it possible to have this submission form go directly to an email address? I need to gather information on a website, but don't want to give special access to the people who need this information. The problem could be solved if I could have the completed form emailed to an outside email address. I know I did this in the past with a version of Mighty Resources, but I cannot figure out how to do it this time.

I'll be glad to hear that I am missing something obvious.

Thanks, Patrick

Okay, found an additional problem. Once again, I'm really hope it is something obvious that I'm not seeing. When I look for the button controls in the submission type, I'm not seeing them. Am I looking in the wrong place?

Последние изменения: 25 Апр 2015

Метки Developer


pepperstreet VIP
Total posts: 3,837
21 Сен 2014 20:52

Crowcreek I know I did this in the past with a version of Mighty Resources, but I cannot figure out how to do it this time.

I agree with you ;) I am also missing the "easy direct" mail sending and options. I don't think it was better, but we should still have the option, IMHO.

In Cobalt, the whole notification system and features have changed. See yourSection -> Tab Events Parameters. There is on-site notification and follow feature. Also emails are supported, but you need to setup a CRON JOB for it.


Crowcreek VIP
Total posts: 4
21 Сен 2014 21:22

Thanks for your help. I'm going to work through the Cron Job set up shortly.

In the meantime, are buttons located in the type or section? I can't seem to find them anywhere. I'm attaching a screenshot with the things I want to get out of the submission form. Could you possibly tell me where to look for these items?

Thanks Form Problem with Visible buttons (Cobalt)2.JPG


Crowcreek VIP
Total posts: 4
21 Сен 2014 21:23

Also, realize that metadata and special fields are not the same issue as buttons.

Don't want you to think that giving advice will be hopeless.


pepperstreet VIP
Total posts: 3,837
21 Сен 2014 23:21

Crowcreek are buttons located in the type or section? I can't seem to find them anywhere.

All this is related to "submission"...

Go to YourType -> 2nd Tab General Parameters -> Templates -> Submission form (default)

Click the small edit/gear icon to edit template parameters.

mj_cob_type_templates

You can turn off; restrict by ACL or rename labels for almost anything.


Crowcreek VIP
Total posts: 4
22 Сен 2014 01:03

Thank you so much. This was frustrating me tremendously. I knew I had to be overlooking something.

I really didn't take into account how much more developed Cobalt is as compared to where Mighty Resources was a few years ago. Now all I have to do is resolve how to make the thing send directly to an email address.

Thanks again.


Sergey
Total posts: 13,748
22 Сен 2014 01:49

Crowcreek Now all I have to do is resolve how to make the thing send directly to an email address.

You want to send article content to email address? There is no such an option. Only notification about new article may be emailed and then user will have to go to site to see.

Although it is possible to create plugin that can send an email onAfterArticleSaved

http://docs.mintjoomla.com/en/cobalt/cobalt-events/


pepperstreet VIP
Total posts: 3,837
22 Сен 2014 22:46

Crowcreek I don't want to give special access to the people who need this information.

Alternative workaround

You may also use the RSS FEED. Set all respective fields' parameter to include the field in RSS feed. Publish J! Syndicate module on your section list page. Let user's subscribe to the feed URL. (you may email that link to certain user's, assign those users to a certain usergroup/ACL, and show the RSS module for that particular J! ACL)


pepperstreet VIP
Total posts: 3,837
22 Сен 2014 22:55

sergey Only notification about new article may be emailed and then user will have to go to site to see.

@Sergey
I know my way around in Cobalt, but I have used the CRON JOB feature for the first time ;) And it works...

But is it really limited to a short notification email and link? I have seen the new events parameters, text constants and [PLACEHOLDERS]. The description also talks about short- and full message. I can even use field ID placeholder to show any value.

Big dumb question: Where is short message and full message used?! I thought short is for activity and full is for email... apparently I am totally wrong here. Can you clarify it, please.


Sergey
Total posts: 13,748
25 Сен 2014 03:59

pepperstreet Big dumb question: Where is short message and full message used?! I thought short is for activity and full is for email... apparently I am totally wrong here. Can you clarify it, please.

Activity use long message. Email use short because it agregates messages by article.


pepperstreet VIP
Total posts: 3,837
25 Сен 2014 23:34

Sergey Email use short because it agregates messages by article.

So, I can't use all that cool [PLACEHOLDERS] and field values [ID] ?!?


Sergey
Total posts: 13,748
26 Сен 2014 03:09

Yep.


pepperstreet VIP
Total posts: 3,837
27 Сен 2014 11:39

pepperstreet So, I can't use all that cool [PLACEHOLDERS] and field values [ID] ?!?

Sergey Yep.

:O :|| :T :C


Sergey
Total posts: 13,748
29 Сен 2014 07:35

I understand. I'll try to do someting about it.


pepperstreet VIP
Total posts: 3,837
29 Сен 2014 19:05

Sergey I understand. I'll try to do someting about it.

+1 :)


klox7 VIP
Total posts: 914
24 Апр 2015 08:46

Sergey

Crowcreek Now all I have to do is resolve how to make the thing send directly to an email address.

You want to send article content to email address? There is no such an option. Only notification about new article may be emailed and then user will have to go to site to see.

What about just sending automated mail when someone submits form? Without form field. Somethink like thank you page but as email.


danielbidala VIP
Total posts: 153
24 Апр 2015 13:46

Hi klox!

Why don't you create small plugin and use onAfterArticleSaved event. I use this code in my plugin to send email. This code sends different email if new article saved or if article edited. You can modify it based on your needs.

defined('_JEXEC') or die('Restricted access');

require_once JPATH_ROOT . '/components/com_cobalt/api.php';

class plgMintMyPlugin extends JPlugin
{
    public function onAfterArticleSaved($isnew, $record, $fields, $section, $type)
    {
        if($isnew && $type->id == '1' && $fields[167]->value == '1')
        {
            $to = ''.implode(",",$fields[3]->value).'';
            $subject = 'New order: '.$record->title.'';
            $message = 'Massage of your email.';
            $headers = 'From: Bright ERP <noreply[kukac]brighterp.com>' . "\r\n" .
            'Reply-To: noreply[kukac]brighterp.com' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
            mail($to, $subject, $message, $headers);             
        }
        if($isnew == '0' && $type->id == '1' && $fields[167]->value == '1')
        {
            $to = ''.implode(",",$fields[3]->value).'';
            $subject = 'Modified order: '.$record->title.'';
            $message = 'Massage of your email.';
            $headers = 'From: Bright ERP <noreply[kukac]brighterp.com>' . "\r\n" .
            'Reply-To: noreply[kukac]brighterp.com' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
            mail($to, $subject, $message, $headers);             
        }
    }
}

klox7 VIP
Total posts: 914
25 Апр 2015 09:06

Hi danielbidala,

that's great. Thanks for sharing.


pepperstreet VIP
Total posts: 3,837
25 Апр 2015 13:27

@danielbidala

+1 Thanks.


@Sergey

pepperstreet

pepperstreet So, I can't use all that cool [PLACEHOLDERS] and field values [ID] ?!?

Sergey Yep.

:O :|| :T :C

Any news on [PLACEHOLDERS]?

Работает на Cobalt