How to create a custom form field type in a module? - joomla

Im useing joomla 2.5, and I want to create a custom form field type that stored in the same module.
In the XML:
<fieldset name="basic" addfieldpath="/modules/mod_royalslider/fields"></fields>
<fieldset name="basic">
<field name="title" type="City" label="anythging" description="" />
</fieldset>
</fields>
In the file /modules/mod_royalslider/fields/city.php
<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
jimport('joomla.form.formfield');
class JFormFieldCity extends JFormField {
protected $type = 'City';
// getLabel() left out
public function getInput() {
return '<select id="'.$this->id.'" name="'.$this->name.'">'.
'<option value="1" >New York</option>'.
'<option value="2" >Chicago</option>'.
'<option value="3" >San Francisco</option>'.
'</select>';
}
}
for now it show me error, when ever i remove
<fieldset name="basic" addfieldpath="/modules/mod_royalslider/fields"></fields>
the error gone and the field disply as a text field.

You forgot to specify models in the addfieldpath
<fields name="params">
<fieldset name="basic" addfieldpath="/modules/mod_royalslider/models/fields">
<field name="title" type="City" label="anythging" description="" />
</fieldset>
</fields>
Just put the fields folder inside the models folder and put the path like above.

You just do it using the code you gave, easy:
<fields>
<fieldset name="basic" addfieldpath="/modules/mod_royalslider/fields">
<field name="title" type="City" label="anythging" description="" />
</fieldset>
</fields>

Use addfieldpath within fields as like ::
<fields name="params" addfieldpath="/modules/mod_royalslider/models/fields" >
<fieldset name="basic">
<field name="title" type="City" label="anything" description="" />
</fieldset>
</fields>

you can try using this code. this work in mine
<fieldset addfieldpath="/modules/mod_royalslider/models/fields" name="basic">
<field name="title" type="City" label="anything" description="" />
</fieldset>

Related

Joomla4 : how to set parameters in an extension?

I have developed a Joomla3 extension and I try to run in in Joomla4.1
In my XML file:
<extension version="3.1" type="plugin" group="content" method="upgrade">
<config>
<fields name="params">
<fieldset name="basic">
<field name="webmasterid" type="text" default="" label="Enter webmasterid"/>
<field name="password" type="password" default="" label="Enter Password"/>
</fieldset>
</fields>
</config>
But I don't see any way from my /administrator/ panel where I can set these 2 params:
webmasterid, password
What is the correct way to have them displayed in /administrator/ panel ?
(the plugin still works correctly, but I have to set these values directly in my plugin code)

Joomla - Convenient Template Upgrades

I recently migrated a website from Jekyll to Joomla (currently 3.9). Therefore I made an own Joomla Template. It is already in production, but of course it gets regular updates. I use a quite standard development/release approach, versioning like 1.1, 1.2, 1.2.1 and so on. These numbers are always up to date in templateDetails.xml. Nothing special so far. But this has some very inconvenient issues:
Every time I upgrade the template I have to set a different template/style as default, uninstall the old version, upload and install the current version and set its style as new default. Is there really no better way for upgrading a template, especially if it has an higher version?
For each update all my configurations of the style get lost. I already put the defaults accordingly in the templateDetails.xml, so I don't have to do this on every upgrade. But I can imagine this may cause problems when I change the configuration in the back end without updating the template. This would result in potential configuration loss after an upgrade. Can I keep any style configuration when upgrading?
Third, I'm thinking of using different styles for different pages on my website. These would also get lost when upgrading, so I'd have to redefine them regularly. I also would have to reconfigure all pages using these styles to use them again. Is there a way to define several styles in templateDetails.xml, so they are stored in my zip file?
Edit: As Irfan asked for, here is my current templateDetails.xml
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.8" type="template">
<name>####</name>
<creationDate>2018-11-03</creationDate>
<author>####</author>
<authorEmail>#########.de</authorEmail>
<authorUrl>https://###.##.##</authorUrl>
<copyright>SV FOO BAR e.V.</copyright>
<license>TBA</license>
<version>0.4.0-SNAPSHOT</version>
<description>Joomla-Template fuer die Vereinshomepage des SV FOO BAR e.V.</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>template_preview.png</filename>
<filename>template_thumbnail.png</filename>
<filename>main.css</filename>
<filename>favicon.ico</filename>
<folder>images</folder>
<folder>html</folder>
<folder>language</folder>
<folder>js</folder>
</files>
<positions>
<position>breadcrumb</position>
<position>left</position>
<position>right</position>
<position>footer</position>
</positions>
<languages folder="language">
<language tag="de-DE">de-DE/de-DE.tpl_svFOOBAR.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="advanced">
<field
name="sitedescription"
type="text"
label="JGLOBAL_DESCRIPTION"
description="JGLOBAL_SUBHEADING_DESC"
default="This is my slogan"
filter="string" />
<field
name="copyright-from"
type="number"
default="2005"
label="TPL_SVFOOBAR_FIELDS_LABEL_COPYRIGHT_FROM"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COPYRIGHT_FROM"
step="1"
required="true" />
</fieldset>
<fieldset name="cookieconsent">
<field
type="spacer"
name="cookieconsent_separator_general"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_SEPARATOR_general" />
<field
name="cookieconsent_activate"
type="checkbox"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_ACTIVATE"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_ACTIVATE"
checked="1"
value="1" />
<field
name="cookieconsent_position"
type="list"
default="top"
required="true"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_POSITION">
<option value="top">TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION_BANNER_TOP</option>
<option value="top-pushdown">TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION_BANNER_TOP_PUSHDOWN</option>
<option value="bottom">TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION_BANNER_BOTTOM</option>
<option value="bottom-left">TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION_FLOATING_LEFT</option>
<option value="bottom-right">TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_POSITION_FLOATING_RIGHT</option>
</field>
<field
type="spacer"
name="cookieconsent_separator_colors"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_SEPARATOR_COLORS" />
<field
name="cookieconsent_color_banner"
required="true"
type="color"
default="#efefef"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_COLOR_BANNER"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_COLOR_BANNER" />
<field
name="cookieconsent_color_button"
required="true"
type="color"
default="#8ec760"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_COLOR_BUTTON"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_COLOR_BUTTON" />
<field
name="cookieconsent_color_banner_text"
required="true"
type="color"
default="#404040"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_COLOR_BANNER_TEXT"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_COLOR_BANNER_TEXT" />
<field
name="cookieconsent_color_button_text"
required="true"
type="color"
default="#ffffff"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_COLOR_BUTTON_TEXT"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_COLOR_BUTTON_TEXT" />
<field
type="spacer"
name="cookieconsent_separator_texts"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_SEPARATOR_TEXTS" />
<field
name="cookieconsent_learnmore_text"
type="text"
default="Mehr erfahren"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_LEARNMORE_TEXT"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_LEARNMORE_TEXT"
filter="string" />
<field
name="cookieconsent_learnmore_link"
type="url"
default="impressum-datenschutz"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_LEARNMORE_LINK"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_LEARNMORE_LINK" />
<field
name="cookieconsent_message"
type="textarea"
default="Um die Funktionalität und den Inhalt der Website zu optimieren, verwenden wir Cookies. Durch die Nutzung unserer Website stimmst du der Verwendung von Cookies zu."
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_MESSAGE"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_MESSAGE"
rows="10"
cols="5" />
<field
name="cookieconsent_dismiss_button"
type="text"
default="Verstanden"
label="TPL_SVFOOBAR_FIELDS_LABEL_COOKIECONSENT_DISMISS_BUTTON"
description="TPL_SVFOOBAR_FIELDS_DESCRIPTION_COOKIECONSENT_DISMISS_BUTTON" />
</fieldset>
</fields>
</config>
</extension>
Try updating the extension tag to include a method of upgrade:
<extension version="3.8" type="template" method="upgrade" client="site">

Joomla/K2 Listing K2 categories in a module parameter

Is it possible to list K2 categories in a module parameter using something like the default Joomla category field type?
<field name="mycategories" type="category" extension="com_content" multiple="true" label="Category" description="" />
Thanks in advance.
Taken from K2 content Module:
<fieldset name="basic" addfieldpath="/administrator/components/com_k2/elements/">
...
<field name="category_id" type="categoriesmultiple" default="" label="K2_SELECT_ONE_OR_MORE_CATEGORIES" description="K2_SELECT_ONE_ORE_MORE_CATEGORIES_FOR_WHICH_YOU_WANT_TO_FILTER_AN_ITEMS_LIST_SELECT_NONE_TO_FETCH_ITEMS_FROM_ALL_CATEGORIES"/>
....
</fieldset>

Post sales order to 3rd party api with reply

Basically I'm trying to send sales orders to third-party API from magento and receive a notification whether the order has been accepted or not.
I have created users and rolls for the rest system with api user and password And I have read multiple Forum posts but can't seem to find where to go from here I have a piece of code which I've been given by the third- API to connect to their API here is the info below
Post example (fixed)
<form method="post" action="http://iconnect.ibacstel.com/submitorder.php">
<input name="api_key" value="Your API Key" />
<input name="api_password" value="Your API Password" />
<input name="notify_url" value="Notify URL" /> <!-Notify url is your websites url where you would like to get notification from ibacstel api -->
<input name="receipt_header" value="Header Line1%%123 Street Address, City, Zip Code" />
<input name="receipt_footer" value="Thanks for your custom..." />
<input name="printer_id" value="Your printer ID" />
<input name="order_id" value="OrderID" />
<input name="currency" value="Currency" /><!--ex. USD/GBP -->
<input name="order_type" value="1" /><!--Delivery=1, Pick up=2, Reservation=3-->
<input name="payment_status" value="6" /><!--Paid=6, Not Paid=7-->
<input name="payment_method" value="Payment Method" />
<input name="delivery_time" value="18:30 17-09-10 " /><!--Format=HH:MM DD-MM-YY-->
<input name="auth_code" value="Payment authorization code" />
<input name="cat_1" value="Category 1" />
<input name="item_1" value="Item Name 1" />
<input name="desc_1" value="Item description 1" />
<input name="qnt_1" value="1" />
<input name="price_1" value="10.50" />
<input name="cat_2" value="" />
<input name="item_2" value="Item Name 2" />
<input name="desc_2" value="Item description 2" />
<input name="qnt_2" value="1" />
<input name="price_2" value="10.50" />
<input name="cat_3" value="Category 2" />
<input name="item_3" value="Item Name 3" />
<input name="desc_3" value="Item description 3" />
<input name="qnt_3" value="1" />
<input name="price_3" value="10.50" />
---------
You can place more items here using above format.
Please note that you don't need to send category name for the items after first item if the category name is same and if you put all same category items consecutively.
---------
<input name="deliverycost" value="3.50" />
<input name="card_fee" value="0.50" />
<input name="extra_fee" value="1.50" />
<input name="total_discount" value="4.50" />
<input name="total_amount" value="56.50" /><!--Grand Total -->
<input name="cust_name" value="Customer Name" />
<input name="cust_address" value="Customer address" />
<input name="cust_phone" value="Phone number" />
<input name="cust_instruction" value="Special instruction" />
<input name="isVarified" value="4" /><!-Verified=4, Not verified=5 -->
<input name="num_prev_order" value="Number of previous order" />
---------settings---------
<input name="apply_settings " value="1" />
<input name="auto_print" value="1" />
<input name="auto_accept" value="1" />
<input name="enter_delivery_time" value="1" />
<input name="time_input_method" value="2" />
<input name="time_list" value="0-5-10-15-20-25-30-35-40-45-50-55-60" />
<input name="extra_line_feed" value="3" />
<input type="submit" value="Submit" />
</form>
Post example (free style)
<form method="post" action="http://iconnect.ibacstel.com/submitorderfreestyle.php">
<input name="api_key" value="Your API Key" />
<input name="api_password" value="Your API Password" />
<input name="notify_url" value="Notify URL" /> <!-Notify url is your websites url where you would like to get notification from ibacstel api -->
<input name="receipt_header" value="Header Line1%%123 Street Address, City, Zip Code" />
<input name="receipt_footer" value="Thanks for your custom..." />
<input name="printer_id" value="Your printer ID" />
<input name="order_id" value="OrderID" />
<input name="currency" value="Currency" /><!--ex. USD/GBP -->
<input name="delivery_time" value="18:30 17-09-10 " /><!--Format=HH:MM DD-MM-YY-->
<input name="print_data" value="Line 1/rLine 2%%Line 3/-" />
<input name="total_amount" value="56.50" /><!--Grand Total -->
---------settings---------
<input name="apply_settings " value="1" />
<input name="auto_print" value="1" />
<input name="print_only" value="0" />
<input name="auto_accept" value="1" />
<input name="enter_delivery_time" value="1" />
<input name="time_input_method" value="2" />
<input name="time_list" value="0-5-10-15-20-25-30-35-40-45-50-55-60" />
<input name="extra_line_feed" value="3" />
<input type="submit" value="Submit" />
</form>
Success response
<response>
<status>OK</status>
<details>
<msg>Order has been stored successfully</msg>
</details>
</response>
Error response
<response>
<status>FAILED</status>
<details>
<error> Authentication failed </error>
<error> Other errors...</error>
</details>
</response>
Update notification format
When printer sends a callback response to API the API sends a notification to the Provided Notify URL with order
In your notification url you will get notification regarding the status of the order, all the information will be submitted via post method which will allow you to grab information easily.
Post variables:
"printer_id" = Printer ID
"order_id" = Order ID
"status" = (1=accepted,2=rejected)
"msg" = message from printer
"delivery_time" = confirmed delivery time from printer
"manual_update" = (1=manual update identifier)
"booking" = (1=manage booking identifier)
Please note that you will not get the notification while you are sending order to API even if the notify URL is same as where you are sending order to API. API will send response later automatically when the order will be accepted/rejected from printer to that Notify URL you provided with order. So we recommend you to use separate URL/file to send order to API and receive notification from API to avoid confusion.
Example in PHP
Lets say you are sending order the URL of your site www.example.com/sendorder.php to API
So you need to write necessary code on sendorder.php to send order information from your site to API. I am not telling you the details here how to send order to API. Please check our example html form above to send order information to API.
Lets say you have used the value of notification URL field www.example.com/receivenotification.php in orders sending form like <input name="notify_url" value="www.example.com/receivenotification.php" /> then iConnect API will send notification to www.example.com/receivenotification.php as soon as API get response from printer when an order will be accepted/rejected after printing. Here is the example code to grab the information from API notification need to be placed on receivenotification.php file.
<?php
$printer_id = $_REQUEST['printer_id'];
$order_id = $_REQUEST['order_id'];
$order_status = $_REQUEST['status'];
$message = $_REQUEST['msg'];
$delivery_time = $_REQUEST['delivery_time'];
if($order_status==1){
//order has been accepted from printer
//do your necessary task for accepted order like update databse, send email to customer to inform him that his order has been accepted and will be delivered on returned delivery time (variable $delivery_time).
}
else{
//order has been rejected from printer
//do your necessary task for rejected order like update databse, send email to customer to inform him that his order has been rejected for the returned reason (variable $message).
}
?>
Basically I need to know where to put this code and or what file I have to modify or create in order to do this. Thanks in advance
So i have created all of the files that you detailed out and i have put my 3rd party code where you stated it to go but, isnt working, heree is my thirdparty.php file contents maybee you will se where im going wrong.
<?php
class Bh_ZeroSubtotalpaymentmethod_Model_Thirdparty {
public function automatic(Varien_Event_Observer $observer)
{
$orderIds = $observer->getEvent()->getOrderIds();
if (empty($orderIds) || !is_array($orderIds)) {
return;
}
foreach($orderIds as $eachOrderId){
$order = Mage::getModel('sales/order')->load($eachOrderId);
<form method="post" action="http://iconnect.ibacstel.com/submitorderfreestyle.php">
<input name="api_key" value="******" />
<input name="api_password" value="************" />
<input name="notify_url" value="Notify URL" /> <!-Notify url is your websites url where you would like to get notification from ibacstel api -->
<input name="receipt_header" value="Header Line1%%Take, City, Zip Code" />
<input name="receipt_footer" value="Thanks for your custom..." />
<input name="printer_id" value="Your printer ID" />
<input name="order_id" value="OrderID" />
<input name="currency" value="Currency" /><!--ex. USD/GBP -->
<input name="delivery_time" value="18:30 17-09-10 " /><!--Format=HH:MM DD-MM-YY-->
<input name="print_data" value="Line 1/rLine 2%%Line 3/-" />
<input name="total_amount" value="56.50" /><!--Grand Total -->
---------settings---------
<input name="apply_settings " value="1" />
<input name="auto_print" value="1" />
<input name="print_only" value="0" />
<input name="auto_accept" value="1" />
<input name="enter_delivery_time" value="1" />
<input name="time_input_method" value="2" />
<input name="time_list" value="0-5-10-15-20-25-30-35-40-45-50-55-60" />
<input name="extra_line_feed" value="3" />
<input type="submit" value="Submit" />
</form>
Success response
<response>
<status>OK</status>
<details>
<msg>Order has been stored successfully</msg>
</details>
</response>
Error response
<response>
<status>FAILED</status>
<details>
<error> Authentication failed </error>
<error> Other errors...</error>
</details>
</response>
}
return $this;
}
}
is this correct? also can you please take a look at the third party code and tell me weather this will work in magento or do i have to translate this into a different language? Thankks
Magento have an interesting feature Event-obsever and trigger and run some code using observer.
For example,nagento event list http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
for frontend after place an order run some
Create an extension using
create config.xml under app/code/local/Bh/ZeroSubtotalpaymentmethod/etc
<?xml version="1.0" ?>
<config>
<modules>
<Bh_ZeroSubtotalpaymentmethod>
<version>1.0.1</version>
</Bh_ZeroSubtotalpaymentmethod>
</modules>
<global>
<models>
<zerosubtotalpaymentmethod>
<class>Bh_ZeroSubtotalpaymentmethod_Model</class>
</zerosubtotalpaymentmethod>
</models>
</global>
<frontend>
<events>
<checkout_onepage_controller_success_action>
<observers>
<create_thridparty_order>
<class>zerosubtotalpaymentmethod/thirdparty</class>
<method>automatic</method>
</create_thridparty_order>
</observers>
</checkout_onepage_controller_success_action>
</events>
</frontend>
<adminhtml>
<events>
<checkout_submit_all_after>
<observers>
<create_thridparty_order>
<class>zerosubtotalpaymentmethod/thirdparty</class>
<method>automatic</method>
</create_thridparty_order>
</observers>
</checkout_submit_all_after>
</events>
</adminhtml>
</config>
**** And then create Thirdparty.php under app/code/local/Bh/ZeroSubtotalpaymentmethod/Model/**
<?php
class Bh_ZeroSubtotalpaymentmethod_Model_Thirdparty {
public function automatic(Varien_Event_Observer $observer) {
$orderIds = $observer->getEvent()->getOrderIds();
if (empty($orderIds) || !is_array($orderIds)) {
return;
}
foreach ($orderIds as $eachOrderId) {
$order = Mage::getModel('sales/order')->load($eachOrderId);
//right our third party code
client = new Zend_Http_Client();
$client->setUri('http://iconnect.ibacstel.com/submitorderfreestyle.php');
$client->>setParameterPost(array(
'api_key' => 'yourapi',
'apikey' => 'xxxx',
'message' => $message,
'order_id' => $order_id,
...//more params
));
$response = $client->request('POST');
// Yet another way of preforming a POST request
$client->setMethod(Zend_Http_Client::POST);
if (!$response->isSuccessful()) {
Mage::log($response);
}
}
return $this;
}
}
Also.create under Bh_ZeroSubtotalpaymentmethod.xml
app/etc/modules/
<?xml version="1.0" ?>
<config>
<modules>
<Bh_ZeroSubtotalpaymentmethod>
<active>true</active>
<codePool>local</codePool>
</Bh_ZeroSubtotalpaymentmethod>
</modules>
</config>

Separation of forms & also drop down menu alteration when object selected

In the image provided of my registration page, I wish to put a vertical separator inbetween the form on the left to have another form on the right to be completed for the registration but I have no idea how to do it.
http://puu.sh/1FJIA
Also the second part of my question pertains to the drop down menu, how would I put an extra option other than #_usergroups that when selected will alter the drop down menu to change into a text box? Below is the coding used for the xml.
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="default"
label="COM_USERS_REGISTRATION_DEFAULT_LABEL"
>
<field name="spacer" type="spacer" class="text"
label="COM_USERS_REGISTER_REQUIRED"
/>
<field name="name" type="text"
description="COM_USERS_REGISTER_NAME_DESC"
filter="string"
label="COM_USERS_REGISTER_NAME_LABEL"
message="COM_USERS_REGISTER_NAME_MESSAGE"
required="true"
size="30"
/>
<field name="username" type="text"
class="validate-username"
description="COM_USERS_DESIRED_USERNAME"
filter="username"
label="COM_USERS_REGISTER_USERNAME_LABEL"
message="COM_USERS_REGISTER_USERNAME_MESSAGE"
required="true"
size="30"
validate="username"
/>
<field name="password1" type="password"
autocomplete="off"
class="validate-password"
description="COM_USERS_DESIRED_PASSWORD"
field="password2"
filter="raw"
label="COM_USERS_REGISTER_PASSWORD1_LABEL"
message="COM_USERS_REGISTER_PASSWORD1_MESSAGE"
required="true"
size="30"
validate="equals"
/>
<field name="password2" type="password"
autocomplete="off"
class="validate-password"
description="COM_USERS_REGISTER_PASSWORD2_DESC"
filter="raw"
label="COM_USERS_REGISTER_PASSWORD2_LABEL"
message="COM_USERS_REGISTER_PASSWORD2_MESSAGE"
required="true"
size="30"
/>
<field name="email1" type="email"
description="COM_USERS_REGISTER_EMAIL1_DESC"
field="id"
filter="string"
label="COM_USERS_REGISTER_EMAIL1_LABEL"
message="COM_USERS_REGISTER_EMAIL1_MESSAGE"
required="true"
size="30"
unique="true"
validate="email"
/>
<field name="email2" type="email"
description="COM_USERS_REGISTER_EMAIL2_DESC"
field="email1"
filter="string"
label="COM_USERS_REGISTER_EMAIL2_LABEL"
message="COM_USERS_REGISTER_EMAIL2_MESSAGE"
required="true"
size="30"
validate="equals"
/>
<field name="title" type="sql"
default="-None Listed-"
label="Select your University"
description="Select the University you are currently attending, if
it's not on the list then create it below"
query="SELECT title FROM #__usergroups WHERE ID > '8 ' "
required="true"
/>
<field
name="captcha"
type="captcha"
label="COM_USERS_CAPTCHA_LABEL"
description="COM_USERS_CAPTCHA_DESC"
validate="captcha"
/>
</fieldset>
</form>
1. Vertical separator:
you can use a hack i.e. create some fields which will output markup.
The idea here is to insert an extra
<div style='width:50%'>
before the first field;
Then a
</div><div style='width:49%;border-left:1px dashed black'>
where you want the separator
and finally a at the end.
Create three new spacer fields.
You can either insert properly escaped html directly:
<field type="spacer" name="splitterinit" label="<div>" />
or put the html as language constants in the language file:
SPLITTER_MID="</div><div style='width:49%;border-left:1px dashed black'>"
and simply use the constant in the .xml:
<field type="spacer" name="splittermid" label="SPLITTER_MID" />
2. Extra text option:
Easy: Simply add a text field below to allow the user to type in.
Harder: Create a custom element, there you can write php and make it
as you want it
3. A word of advice
Chronoforms features a user registration override that lets you define all the fields you want, and for sure you'll find more similar extensions on the JED
Also, all community solutions feature custom profiles.

Resources