Change the look of the Individual Registration form

  • Lasternom
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago #117382 by Lasternom
Hi,

I'm trying to change the look of the "Individual Registration form". Specifically the custom fields that are displayed in them.

If found that default.php that can be found in \com_eventbooking\themes\default\register changes most things I need. However im looking at the part that makes the custom fields different.

In the default.php is a small part that makes the php code I need to change.
Code:
foreach ($fields as $field) { echo $field->getControlGroup($bootstrapHelper); }

This part of code gives the following in php
Code:
<div class="control-group" id="field_first_name"> <div class="control-label"> <label id="first_name-lbl" for="first_name" class="">First Name <span class="star">&nbsp;*</span> </label> </div> <div class="controls"> <input type="text" name="first_name" id="first_name" value="" class="input-large validate[required]"> </div> </div>

My question is where is this code made ? For example I want to change part of the above code, where would I be able to change this ?

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #117390 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change the look of the Individual Registration form
Hello

Exactly what you want to change? If you want to change it, you will have to modify code in the file administrator/components/com_eventbooking/libraries/rad/form/field.php, method getControlGroup

Tuan
The following user(s) said Thank You: Lasternom

Please Log in or Create an account to join the conversation.

  • Lasternom
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago #117417 by Lasternom
Hi,

Thanks for your amazing reply, I'm almost able to make all the changes that are needed.
What i'm looking to change is a few small parts of the code I posted before.

I want to go from this:
Code:
<div class="control-group" id="field_first_name"> <div class="control-label"> <label id="first_name-lbl" for="first_name" class="">First Name <span class="star">&nbsp;*</span> </label> </div> <div class="controls"> <input type="text" name="first_name" id="first_name" value="" class="input-large validate[required]"> </div> </div>

To:
Code:
<div class="control-group" id="field_first_name"> <div class="control-label"> <label id="first_name-lbl" for="first_name" class="">First Name <span class="star">&nbsp;*</span> </label> <input type="text" required placeholder="First Name" id="first_name" value="" class="input-large validate[required]"> </div> </div>

I was able to find most what I needed in the field.php document however one thing is still unclear.

The line of code:
Code:
<input type="text" name="first_name" id="first_name" value="" class="input-large validate[required]">

can be found in the document being generated by

$this->getInput($bootstrapHelper)

However unlike $this->getLabel() I was again unable to find how to edit the $this->getInput($bootstrapHelper) part.
I can find the function of this just above the getLable and getControlGroup functions but unable to understand how it works or how i could change it.

Thanks for helping a novice like me !!

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #117419 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change the look of the Individual Registration form
Hi

$this->getInput depends on the field type. In your sample, it's text field type. So you can look at administrator/components/com_eventbooking/libraries/rad/form/field/text.php, method getInput and change it to meet your need

Tuan
The following user(s) said Thank You: Lasternom

Please Log in or Create an account to join the conversation.

  • Lasternom
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago #117455 by Lasternom
YES!!!!

Thank you, your last reply made it possible for me to make the changes I needed.

<3

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #117458 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Change the look of the Individual Registration form
OK, great. Please note that the modified file is core file, so you need to make a backup of that file and restore it each time you update to new version of the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc