Jump to content


Welcome to the forum:

Welcome to the iThemes, PluginBuddy and WebDesign.com forum. We've created several tutorial video's to help you get you started with using the forum, please check them out!

Also take note of the forum guidelines.


Support hours:

Our moderators actively respond to forum support requests during normal business hours which are Monday-Friday, 8am - 5pm Central Standard Time, typically within one business day. Although some moderators choose to work during the weekends, we can not guarantee immediate attention to your requests. Thanks for understanding.

What is included with support:

Premium support includes theme/plugin issues such as: bugs encountered under normal operation, how to use basic features, basic WordPress help, and basic help with customization (meaning we point you to resources and will help in more depth as time allows). More information.

in progress

Add/modify Html To Buttons



7 replies to this topic

#1 Guest_Thomas_*

Guest_Thomas_*
  • Guests

Posted 24 April 2014 - 09:40 PM

Hi,

In the individual template files such as the save.php (code provided below):

<?php do_action( 'it_exchange_content_profile_before_save_button_element' ); ?>
<div class="it-exchange-customer-save it-exchange-profile-save">
<?php it_exchange( 'customer', 'save' ); ?>
</div>
<?php do_action( 'it_exchange_content_profile_after_save_button_element' ); ?>

Is there any way to add/modify the html for:
<?php it_exchange( 'customer', 'save' ); ?>

It outputs as html with the input for Save, but what I'd like to do is add a class to the element somehow without using javascript/jQuery. Is that possible?

Thanks.

#2 Ronald

Ronald

    Forum Admin

  • Administrators
  • Others: All Plugins, All Themes, Moderators, Webdesign
  • 31,106 posts

Posted 25 April 2014 - 04:23 AM

Hi,

perhaps the easiest is to comment out that code or remove it, so that it doesn't execute, and replace it by your own html code. You should be able to find the html code when you view the source code of your site, and copy and paste the relevant block of code.

You should create a copy of the template file using the same path in an exchange folder in your child theme folder. It will then override the one use by Exchange.

won't that work for you?
Ronald

Join the iThemes Builder Community on Google+.



To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.



When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.


#3 Guest_Thomas_*

Guest_Thomas_*
  • Guests

Posted 25 April 2014 - 09:47 AM

Hi @Ronald,

I haven't tried that out - I'll give it a shot. I guess I figured there would be some code that's been prebuilt and I can override in the templates somewhere.

Regards,
Thomas

#4 Guest_Thomas_*

Guest_Thomas_*
  • Guests

Posted 26 April 2014 - 10:23 AM

Hi @Ronald,

I have tried it and I am able to modify the elements for visitors via the source code; however, for the form fields I am not able to do that for registered/logged in customers as the values are dynamic and different. Do you know if there's any way I can add a class to form elements for logged in customers? An example would be for the email address field when a customer has registered and is logged in. I would like to add an arbitrary class of "foo" to the input. Thanks in advance.

Regards,
Thomas

#5 Ronald

Ronald

    Forum Admin

  • Administrators
  • Others: All Plugins, All Themes, Moderators, Webdesign
  • 31,106 posts

Posted 28 April 2014 - 03:35 PM

Hi Thomas,

WordPress adds a class to the body tag for logged in users. Can you not use that?

If not, can you add a link to your site, the page this concerns. I can then have a closer look,

Ronald

Join the iThemes Builder Community on Google+.



To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.



When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.


#6 Guest_Thomas_*

Guest_Thomas_*
  • Guests

Posted 28 April 2014 - 04:17 PM

Hi @Ronald,

Thanks for your reply. I am able to target the body class for the page and it's element for the CSS. I am using Bootstrap for my custom theme and the reason I'm trying to add a class to a form element(s) is because the styles are there from Bootstrap, and I don't want to recreate the styles for the elements if I can simply assign the class with the styles to the element already.

You will need to be logged in to see the element I'd like to add the class to. I can set up a test user and email it to you if you need to see it. For some of the elements, I already had to use jQuery to add the class (even though I was trying to avoid it). Thanks.

#7 Ronald

Ronald

    Forum Admin

  • Administrators
  • Others: All Plugins, All Themes, Moderators, Webdesign
  • 31,106 posts

Posted 30 April 2014 - 03:58 AM

Hi,

I'm not sure I understand. First, I was under the impression you didn't want to use JS, but since you already are, why can't you use it for these fields? And, if the css selectors are available, and allow you to accomplish the styling, why not use that? It seems that there are 2 viable working options, and of course you could edit Exchange (core) code as a 3rd option, but it would be the least favourable.

Ronald

Join the iThemes Builder Community on Google+.



To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.



When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.


#8 Guest_Thomas_*

Guest_Thomas_*
  • Guests

Posted 30 April 2014 - 12:02 PM

Hi @Ronald,

Sorry for the confusion.

Yes, I want to avoid using JS to add a class to a form element. I would rather be able to go into a template for that element and add the class via HTML instead.

For the front-end, for visitors/non-registered/non-paid users, I am able to take the source code and copy/paste and replace the code in a template, adding a class and thus utilizing the predefined styles.

However, for the logged in users/registered/paid users, I am unable to take the source code and copy/paste in a template because the field values are dynamic with user information, therefore, I was asking if there was a way to overcome that via some kind of template that I could modify to accomplish that.

If I could avoid modifying the core to accomplish that, it would be awesome; if there is no other option other than to add javascript to make it happen for logged in users, then I will have no choice but to do that.

When I said I used some javascript to add classes to form elements, I was only trying to say that I managed to do that too, but hoping to avoid. Again, my apologies for the misunderstanding.

If adding JS is the best and only options, let me know, thanks.



Reply to this Topic


ATTENTION
If this topic is marked RESOLVED or INFORMATION, or if you are NOT experiencing EXACTLY the same issue, please start a new topic to provide the details of your problem. If the solution provided doesn't work for you, you should start a new topic. If you feel this thread contains relevant information, you may include a link to it in your new topic. To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. When posting your question or request on the forum, please be as concise and specific as possible. The shorter and more to the point you can make your request, the better.

For BackupBuddy related issues, be sure to include the status log from your most recent backup.

CLICK HERE to start a new topic in the Exchange ecommerce plugin forum.


  



Also tagged with one or more of these keywords: in progress

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users