Editing the Registration view

  • Posts: 139
  • Thank you received: 1
11 years 3 months ago #151917

When checking out, I want to edit the "Registration" view i.e. remove the asterisks from the end of the required fields. I have looked at the "views" in the display menu but can't seem to find the code that controls it.

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

  • Posts: 26260
  • Thank you received: 4042
  • MODERATOR
11 years 3 months ago #151949

Hi,

The asterisks are added by the custom field system of HikaShop.
When a field is required, the asterisk is added.

If you want to remove them, the best is to add a line in the view just before the field is displayed. By removing (just for the view) that the field is not "required" the asterisk won't be displayed.
The view is the "user | custom_fields" (or custom_fields_bootstrap if you have the bootstrap design).

And the goal is to edit the variable $oneExtraField->field_required to set it false.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 139
  • Thank you received: 1
11 years 3 months ago #151972

Hi, thanks for that. I am not sure if I am using the bootstrap or not so I tried modifying both as follow. the line after

foreach($this->extraFields[$type] as $fieldName => $oneExtraField) {
	$oneExtraField->registration_page = @$this->registration_page;

I added
$oneExtraField->field_required = false;

Also trued 0 instead of false

Is this what you meant?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #152591

Hi,

You can edit the view "user / registration_bootstrap" and / or "user / registration" and remove the stars in the html.
They are on the right of the code.

The following user(s) said Thank You: abasel

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

  • Posts: 139
  • Thank you received: 1
11 years 3 months ago #152620

Excellent. I got it all sorted now :-) Thanks

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

Time to create page: 0.070 seconds
Powered by Kunena Forum