Text editor

Evans

Member
Hey great guys, anyone can help me with a guild to how i can resize and change background color of the text box also color of the submit button.
 

Attachments

  • qt.PNG
    qt.PNG
    16.4 KB · Views: 10
Hey great guys, anyone can help me with a guild to how i can resize and change background color of the text box also color of the submit button.
You can change background color of the text box from Lists > "Your list" > Pages from right dropdown select Subscribe form and click on source and add custom style to div for example:
Screenshot 2022-05-04 at 13.46.58.png

To change button color you need to add your custom style using hooks, in folder: web/apps/ create file init-custom.php and then here paste bellow code:
PHP:
<?php
Yii::app()->hooks->addFilter('frontend_list_subscribe_after_transform_list_fields', function($content){
    $str = CHtml::button(Yii::t('lists', 'Subscribe'), array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'style' => "background-color:#3699FF !important; color:#ffffff"));
    return str_replace('[SUBMIT_BUTTON]', $str , $content);
});

These above examples will reproduce something like this:
Screenshot 2022-05-04 at 13.51.05.png
 
Last edited:
Thank you again for your help. I have tried to the best i can do as i am not great with coding and unfortunately it seems i have distorted everything by trying to configure it as you described. I noticed at first my source code was very different from the sample you sent as there was no place or anything like style=..... Anyways i only need to make it dark background with white fonts and same with the submit button. I suggest help from my backend to fix this for me please
 

Attachments

  • three.PNG
    three.PNG
    37.1 KB · Views: 2
  • two.PNG
    two.PNG
    65.4 KB · Views: 2
  • one.PNG
    one.PNG
    26.5 KB · Views: 2
Thank you again for your help. I have tried to the best i can do as i am not great with coding and unfortunately it seems i have distorted everything by trying to configure it as you described. I noticed at first my source code was very different from the sample you sent as there was no place or anything like style=..... Anyways i only need to make it dark background with white fonts and same with the submit button. I suggest help from my backend to fix this for me please
You can't do this without even the slightest knowledge of CSS.
To make your form dark is not possible because tag [LIST_FIELDS] will generate automatically fields for that form and these will be with withe background.
 
I understand. Now I've distorted everything. Can you kindly send me the whole code of the red background you did showed me as example so i can paste it in my source area as I'm lost.
 
I understand. Now I've distorted everything. Can you kindly send me the whole code of the red background you did showed me as example so i can paste it in my source area as I'm lost.
HTML:
<div class="box box-primary borderless">
<div class="box-header">
<h3 class="box-title">[LIST_NAME]</h3>
</div>

<div class="box-body">
<div class="callout callout-info" style="background-color:#212E48 !important;">We're happy you decided to subscribe to our email list.<br />
Please take a few seconds and fill in the list details in order to subscribe to our list.<br />
You will receive an email to confirm your subscription, just to be sure this is your email address.</div>
[LIST_FIELDS]</div>

<div class="box-footer">
<div class="pull-right">[SUBMIT_BUTTON]</div>

<div class="clearfix"> </div>
</div>
</div>

and to change button color in folder: web/apps/ create file init-custom.php and then here paste bellow code:

PHP:
<?php
Yii::app()->hooks->addFilter('frontend_list_subscribe_after_transform_list_fields', function($content){
    $str = CHtml::button(Yii::t('lists', 'Subscribe'), array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'style' => "background-color:#212E48 !important; color:#ffffff"));
    return str_replace('[SUBMIT_BUTTON]', $str , $content);
});

Change color with desired color. This example will appear like that:

Screenshot 2022-05-05 at 09.29.29.png
 
Thanks a million. I was able to change the background as this now. Could you kindly let me know where to paste this button code via a diagrammatic form. Thanks. I could just save and use them at anytime.
 

Attachments

  • cvx.PNG
    cvx.PNG
    38 KB · Views: 4
Can i use same code for the background to replace for the other forms ? example unsubscribe form
 
Could kindly help me around how to make these forms with this template to have same dark color. Just where and what code to change.
 

Attachments

  • der.PNG
    der.PNG
    89.2 KB · Views: 9
  • des.PNG
    des.PNG
    74.1 KB · Views: 9
Could kindly help me around how to make these forms with this template to have same dark color. Just where and what code to change.
On this template you need to change:
- Background for:
HTML:
<td class="darkbg" style="border-collapse:collapse;background:red">
> replace "red" with desired color
- Border color for:
HTML:
<table align="center" border="0" cellpadding="0" cellspacing="0" id="main-table" style="-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:1px solid red;overflow:hidden;background:#FFFFFF;width:600px">
> here search for this: "border:1px solid red" and replace red with desired color.
- Background for footer:
HTML:
<td class="darkbg" style="padding:10px;border-collapse:collapse;background:red;">
> replace "red" with desired color
 
You can change background color of the text box from Lists > "Your list" > Pages from right dropdown select Subscribe form and click on source and add custom style to div for example:
View attachment 15934

To change button color you need to add your custom style using hooks, in folder: web/apps/ create file init-custom.php and then here paste bellow code:
PHP:
<?php
Yii::app()->hooks->addFilter('frontend_list_subscribe_after_transform_list_fields', function($content){
    $str = CHtml::button(Yii::t('lists', 'Subscribe'), array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'style' => "background-color:#3699FF !important; color:#ffffff"));
    return str_replace('[SUBMIT_BUTTON]', $str , $content);
});

These above examples will reproduce something like this:
View attachment 15935
In other words, if i will like to change the button color can i go to my web/apps and edit just the color code as shown here ?

(................"background-color:#3699FF !important; )
 
In other words, if i will like to change the button color can i go to my web/apps and edit just the color code as shown here ?
In this code:
PHP:
<?php
Yii::app()->hooks->addFilter('frontend_list_subscribe_after_transform_list_fields', function($content){
    $str = CHtml::button(Yii::t('lists', 'Subscribe'), array('type' => 'submit', 'class' => 'btn btn-primary btn-flat', 'style' => "background-color:#212E48 !important; color:#ffffff"));
    return str_replace('[SUBMIT_BUTTON]', $str , $content);
});

where you see: background-color: #212E48 , replace "#212E48" with desired color.
 
Back
Top