Validate custom form in ez publish 5? - ezpublish

I would to know , how to validate custom form values in ez publish 5?
any help or links to topics would be very helpful for me.

If the form is a custom Symfony Form, then eZ Platform doesn't provide anything special for it. You must configure validation for your form the way you would with Symfony alone.
If the custom form is related to content, then I need more details in order to answer.

You can refer code from eZ Platform Demo Bundle for Form processing:
https://github.com/ezsystems/ezplatform-demo/blob/master/src/AppBundle/Controller/ContactFormController.php

Related

Alfresco unique constraint validation adding content to webform with xs:unique

Is it possible with standard Alfresco code to perform schema validations when adding new content to a webform? (the webform is associated with the schema file)
I have a simple schema file with 3 elements that must be unique. I've found out that I can use xs:unique to perform this validation and ensure that each element is unique, however Alfresco does not perform this validation at all.
I can submit the content with repeated fields anywhere.
I've been digging the internet to find a solution and it is possible to tackle this issue messing a little with Alfresco extensions, however I would like to know if is there any other way.
Does someone experienced this issue?
you can use custom validation in this custom validation you need to check whether your elements are unique or not please refer this documentation for custom validations.

using magentos server-side validation

I am using Magento version 1.7.0.2 and have created a custom module, in which there is a form that allows user to pass information in to the database.
I need to validate user input and looking around Google all i can see is front-end validation tutorials, I assume magento has server side validation tools? Based on this assumption I had a look in mage/core/customer/block/form/register.php and mage/core/customer/helper/data.php but have been unable to find anything of help, am i looking in the wrong place?
I am aware Zend has some validation, and will use that if Magento has not got it's own/extended zend validation.
In short, does Magento have it's own validation apart from the javascript validation tools?
Magento uses Zend for validation, you can take a look inside Mage/Customer/Model/Customer.php at the method validate()

Email subscription/unsubscribing extension for joomla

I need a simple extension which will simply collect email id's from users who want to hear discount offers from me and also allows anybody to unsubscribe from the mailing list.
Which will be the simple and best one for Joomla 1.5?
I used the following components: Communicator, JNews and AcaJoom
They are all very easy to use. All of them are provided with component for admin, subscribtion module and plugin to integrate subscribtion form into a article. The most simple is Communicator. I used it more often then others
I hope it is helpfull.
I am using AcyMailing, and would say works perfect. You can create different lists, and export users easily. It supports Joomla 1.5 as well.

Adding form in Ez Publish

How can i add a custom form in ez publish cms
See How to Create eZ Publish Forms : Full tutorial
Alternatively, you can setup and embed a Google docs form, and just create a TextBlock datatype field in your class (+ set up raw output in your view template) to allow your editors to create and insert their own Google docs forms.
There is also an inbuilt Feedback form content class which you can copy and modify. In fact, every content-class in the CMS is customisable and an editable object, via a form from the website front-end or from admin.
But I'm guessing that the Feebback Form content type is what you probably want. Go to Setup -> Classes -> Content -> feedback form
usually at yourdomain.com/admin_siteaccess/class/view/19
Although eZ Survey is not the ideal and best way to use contact forms, it works. My company uses it and it was designed for surveys and not forms. Oh well.
It depends on what you want from that form. You can create custom content class and set some attributes as information collectors.
Or you can hardcoded form in template.
But everything depends on what you want from that form.

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.
If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).
If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.
Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.
What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.
EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.
The JForm class helps you build forms.
Documentation can be found here:
joomla CMS: http://docs.joomla.org/API16:JForm
joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html
This class provides you with ready to use form elements and form loading and/or processing methods
This class includes validation methods, date picker control, color picker, etc.
Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.
The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new
This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Or you could just create add a html module to any position and then write the form in html i.e.
<form method="post" action="mycreatedpage.php"> <input type="text"/> <input type="submit">
Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.
Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.
I have got good working experience with Joomla RSForm Pro. It has got options for
validation
user email/admin emails on submit
file uploads
and many more
Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html
Good luck!
Create View.
Create Model.
Create Table.
Create Controller ( if Needed ).
Create Form xml file.
Go here for more information:
http://docs.joomla.org/Standard_form_field_types
Take a look at the Chronoforms extension - does more than you want.
You have two options:
Use an already built custom form extension
Create your own custom form extension (or outsource it)
Now if you only want to modify the user registration form, then you can do some PHP customization to accomplish your goal.
Making forms in Joomla can be done in a couple of ways.
If you just wanted a contact us, you can just create a page with a menu item for the User contact form. This gives you a page with a Members address and contact form. So all you would need to do was add the user as the company of the websites home address and email. But the form is very basic, name, title, textarea for message.
Next up from that you could just make a Custom HTML module add add a form to it in plain HTML like +Sean said above this, you would need to code in PHP your own form process script. You would not get error in form data checking unless you also wrote it.
Next you might rather look on the Joomla Extension Directory JED for one of the good extensions for 3 and 2.5 Joomla RSForms!Pro is good, and can do all we have needed. This lets you add fields one by one and move your form around. Then can auto generate or custom the html of the form.
You can easily create your own forms with Fabrik
Chronoforms are now a days a very popular solution for custom forms in joomla. Chornoforms support twitter bootstrap also. In simple 5 steps you can create a contact form with unlimited fields and also embed various function like DB save, Email, Thanks Message, Redirection on any page. There is events and events will have particular events.
Also possibility of extension of Normal joomla registeration. It will not extend the core registration but at the time of registration you can take various information from users.
I would use Chrono Forms, they work really well and are easy to use.
Download here
Here is a full tutorial on the new Chronoforms 5 to help you get started quickly and understand most of the features available.
CLICK HERE
You can use plugin to insert external php form in content. It is easy and you don't need to make plugin etc. Please use this.
I suggest you to use breezingforms: http://crosstec.de/en/extensions/joomla-forms-download.html
It's one of the best solutions for custom form creation in joomla.

Resources