no option to edit submissions theme?!?!

philip butler created the topic: no option to edit submissions theme?!?!

I need to modify the submissions theme is there any way to do this from administrator or am I going to have to modify the file located in /components/com_formmaker/views/submissions/tmpl/style.css

In particular the .submissions tr.row1 background colour is the came as my text colour so I can't read every other row or data!!!

:(

#22496

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


Support replied the topic: no option to edit submissions theme?!?!

Dear Philip,

Unfortunately we don't have designed themes for submissions yet. You can edit mentioned style.css
We'll take your suggestion into consideration.

Thank you.


Best regards,
Web-Dorado team


Joomla extensions ,
Wordpress plugins ,
Drupal modules
#22529

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


philip butler replied the topic: no option to edit submissions theme?!?!

I've been playing around with creating a alternative layout for the submissions of form maker after some time I've got a working solution
open up

\administrator\components\com_formmaker\admin.formmaker.html.php

to make life easy we already know that the formmaker menu component asks whether you want to export to xml so lets do a search for 'xml'

Line 1279

document.getElementById("jform_request_params").value = "title,search,ordering,entries,views,conversion_rate,pagination,stats,csv,xml,";

we need to add our three alternative layout names to the end of the list: alt_layout1,alt_layout2,alt_layout3,
so our new line 1279 becomes:
document.getElementById("jform_request_params").value = "title,search,ordering,entries,views,conversion_rate,pagination,stats,csv,xml,alt_layout1,alt_layout2,alt_layout3,";


Do another search for 'xml'and the next one should be around

line 1675 (basically the last <tr></tr> before the end of the table declaration </table>

add the following between the </tr> and the </table> (around line 1687)

<tr class="params">

			<td style="vertical-align:top;"> 

				<label>Alternative Layout:</label>

			</td>

			<td class="simple_table">

				<ul>

					<li>

						<input type="checkbox" id="jform_request_alt_layout1" name="jform[request][alt_layout][]" value="alt_layout1">

						<label for="jform_request_alt_layout1">Alternative Layout 1</label>

					</li>
					<li>

						<input type="checkbox" id="jform_request_alt_layout2" name="jform[request][alt_layout][]" value="alt_layout2">

						<label for="jform_request_alt_layout2">Alternative Layout 2</label>

					</li>
					<li>

						<input type="checkbox" id="jform_request_alt_layout1" name="jform[request][alt_layout][]" value="alt_layout3">

						<label for="jform_request_alt_layout3">Alternative Layout 3</label>

					</li>


				</ul>

			</td>	

		</tr>



Thats it. Save the file.


now we need to edit \components\com_formmaker\views\submissions\view.html.php

around line 71, just before parernt::display($tpl); add the following code:-
$params = explode(',',JRequest::getVar('params'));
			$disp = null;
			if (in_array("alt_layout1",$params)){
				$disp = "alt_layout1";
			}
			elseif(in_array("alt_layout2",$params)){
				$disp = "alt_layout1";
			}
			elseif(in_array("alt_layout3",$params)){	
				$disp = "alt_layout3";
			}
			if ($disp != null) {
				$this->setLayout($disp);
			}



SAVE


in components\com_formmaker\views\submissions\tmpl
copy default.php paste and rename to alt_layout1.php Now you can edit alt_layout1.php to your hearts content

Now you can open up the existing/create a new formmaker submissions menu item and you'll see the option to select one of three alternative layouts, select 'Alternative Layout 1' and click 'Save' Just out of curiosity scroll down and click the mouse inside the 'Link' box using your arrow keys move to the end of the url and you should see alt_layout1 included in the params. COOL!
click 'close'.

I've not had chance to modify alt_layout1.php myself yet, but as soon as I do I'll post what I have

#38069

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


philip butler replied the topic: no option to edit submissions theme?!?!

Okay, I really did not know what I was doing with the editing of the submissions template, there was so much code that I didn't understand... HOWEVER I did manage to find the bit that affected the data that I need to display and sucessfully changed the layout from a table based display to a div based display.
The results can be seen here Alternative Submissions Layout
The file I created is attached and the styling needed to make it look right is as follows (I threw this into my template layout.css file

.row { 
 display: inline-block !important; 
}

.submissions td,
.submissions th {
    max-width: 140px !important;
}
.submissions tr.row1 {
    background-color: #222222 !important;
}
.submissions div.row1 {
    background-color: #222222 !important;
}
.submissions div {
	padding: 5px 0 5px 5px;
}

.submissions div div .sub_name {
	font-weight: bold;
}

#38087
Attachments:

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


Support replied the topic: no option to edit submissions theme?!?!

Dear Philip,

This is fantastic! You did a wonderful job, thanks for sharing the code and files with us!
Actually, having several layouts for submissions is a great idea! I will add your notes to our customer wish list, so our developers will consider it when developing future updates of Form Maker.

Thanks again!


Best regards,
Web-Dorado team


Joomla extensions ,
Wordpress plugins ,
Drupal modules
#38143

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


kalilocal replied the topic: no option to edit submissions theme?!?!

Hey Philip, quick question, when you edited/created the alternate submissions layout did you create a brand new css file? Or did you edit an already existing one, your file is no longer attached and I can't seem to find the "template layout.css" file.

thanks

#90603

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


philip butler replied the topic: no option to edit submissions theme?!?!

Hi, it's been a long time, and to be honest, I no longer use formmaker as I prefer now to create my own custom forms from scratch. That being said, I've read through my notes and the css that I mentioned above was added to layout.css file located in joomla/templates/mytemplate/css/layout.css (where mytemplate is the template you are using for your website and layout.css is the template css file that is included within the template index.php file.

Hopefully that makes sense.
p.s the link to the huguenot website above still works but the submissions page that you see is from the custom component I created, not from formmaker.

Good luck,
Philip

#90605

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


Time to create page: 0.209 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us