Skip to Content Skip to Menu

Hide Conditional field in Invoice

  • waynep
  • waynep
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 0
10 years 1 month ago #252756 by waynep
Hide Conditional field in Invoice was created by waynep
Hi, my setup is:
CB:1.9.1
CB Subs: 3.0.0

On the registration page I have Country dropdown box, and depending on which country (2 Options) is selected then the corresponding counties (UK) and Province (France) is display and selectable. (Conditional Field Plugin)

The County and Province fields I have created in CB.

In the CBSubs Setting>Display>Invoices, I have assigned:
State field: to display my county field
Company Field: to display my province field (as I dont need Company field so I have 'hijacked it)

At the next step, they display correctly depending on country selected, BUT, if the selection is UK and corresponding County, the blank Province Field (which was Company) still lists its field name. (SEE ATTACHED)

BUT the reverse it displays true. i.e If it is France & a province, the Country and Province field is displayed, but the State field is not visible. (As expeected)

I have hunted through the edit.front.invoice.xml, but not sure what I need to edit to stop the blank field Label from displaying.

Any help on this GREATLY appreciated.
Attachments:

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48671
  • Thanks: 8312
  • Karma: 1446
10 years 1 month ago #252782 by krileon
Replied by krileon on topic Hide Conditional field in Invoice
The view "showinvoicingaddress" within the below file controls the invoice display.

components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/xml/edit.front.invoice.xml

You'll need to add an XML if usage around the below so it only shows when there's a value.

Code:
<param name="payer_business_name" type="text" size="" default="" label="Company" description="" />

See the IF usage around "address_state" for example.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • waynep
  • waynep
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 0
10 years 1 month ago #252796 by waynep
Replied by waynep on topic Hide Conditional field in Invoice
Hi Krileon,

Thanks for the tip.

Not being a coder, it took a while and this is what I cam up with.

'Seems' to work...

<if name="address_state" type="showhide" operator="!=" value="" valuetype="const:string">
<param name="address_state" type="text" size="" default="" label="County" description="" />
<else action="set" name="address_state" value="" type="const:string" />
</if>

<if name="payer_business_name" type="showhide" operator="!=" value="" valuetype="const:string">
<param name="payer_business_name" type="text" size="" default="" label="Province" description="" />
<else action="set" name="payer_business_name" value="" type="const:string" />
</if>

Any glaring issues with what I came up with?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48671
  • Thanks: 8312
  • Karma: 1446
10 years 1 month ago #252858 by krileon
Replied by krileon on topic Hide Conditional field in Invoice
Looks like it should be ok.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

Moderators: beatnantkrileon
Powered by Kunena Forum