Support

Home Forums Event Espresso Premium Adding new fields to Questions and output it into event form

Adding new fields to Questions and output it into event form

Posted: October 12, 2014 at 6:12 am

Viewing 1 reply thread


yoav ben porat

October 12, 2014 at 6:12 am

Hello,

I would like to know if there is possible way to have a guidance on how to add additional fields to Questions and output them into my event form.

I’m trying to figure out how can I add a form with questions but in two different languages. One is LTR and other is RTL so the question field is going to be in middle of them.

For example:
Name [ __ FIELD __ ] Name(in different language)

I would make the new fields on right of the field by editing my css files.

But i’ll be glad to know which files should I edit in order to add new fields into questions and in which file do I have to put the output field.

P.S i’m using EE3.

Looking forward to your reply.

Thanks.


Dean

October 13, 2014 at 4:30 am

Hi,

This will probably take some coding to get work, as such I suggest you take a look at this file /wp-content/plugins/event-espresso/includes/functions/form_build.php

In that file is a “pluggable” function (http://codex.wordpress.org/Pluggable_Functions) that generates the output of the labels and question fields.

I would say do something like:

		if ( $question->question == "Email") {
			$x = "Liame";
			$html = $html . $x;
		}
		if ( $question->question == "Last Name") {
			$x = "Eman tsal";
			$html = $html . $x;
		}

Just before the

		if (is_numeric($attendee_number)) $attendee_number++;
		return $html;

at the bottom of the function. You will of course need to fiddle with the HTML and CSS to get it to look right.

Viewing 1 reply thread

The support post ‘Adding new fields to Questions and output it into event form’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso