?
avatar ymages
ymages
1 Nov 2016

Steps to reproduce the issue

create a com_contact named Contact , category Forms
create a custom field (radio : Sex->M/F) for com_contact form, category Forms

in Contact settings:
tab Display -> Show User Custom Fields -> All (category Forms is not in the list)
tab Fields -> sex displayed as label only Sex

Expected result

custom field Sex should be displayed in frontend contact form

Actual result

not displayed

System information (as much as possible)

php 5.6
on localhost AMPPS

Additional comments

question for @laoneo #11833 (comment)

avatar ymages ymages - open - 1 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2016
Labels Added: ?
avatar laoneo
laoneo - comment - 1 Nov 2016

Did you switch to contact form context Mail?
image

avatar ymages
ymages - comment - 1 Nov 2016

No look at my screenshots

fields
contact
contact-frontend

avatar ymages
ymages - comment - 1 Nov 2016

fiels-values
field-edit

avatar laoneo
laoneo - comment - 1 Nov 2016

You need to set them for the context Mail, otherwise they will appear on contacts.

avatar ymages
ymages - comment - 1 Nov 2016

I cannot switch from contact to mail , and if I select mail I cannot create a custom field
no idea how to do it
and no idea how to set a contact custom field to mail, there is no option for it

avatar laoneo
laoneo - comment - 1 Nov 2016

In the list where the fields are displayed (as shown in my screenshot of the first comment) select mail. Then hit the new button and create your field.

avatar ymages
ymages - comment - 1 Nov 2016

ok got it ! , the field is displayed but not as radio buttons
sex (optional)

<div class="control-label">
            <label id="jform_params_field_mail_sex-lbl" for="jform_params_field_mail_sex" class="">
    Sex</label>
                            <span class="optional">(optional)</span>
                    </div>

screenshot 2016-11-01 a 10 46 41

avatar ymages
ymages - comment - 1 Nov 2016

added another field -> Job (text)
it's displayed but disabled and disabled = no in the settings

<div class="controls"><input type="text" name="jform[params][mail-field-job]" id="jform_params_mail_field_job" value="" disabled="">
</div>
avatar ymages
ymages - comment - 1 Nov 2016

And now the tab Fields is not displayed anymore

screenshot 2016-11-01 a 11 01 46

avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2016
Title
[com_fields] not display in com_contact form
[com_fields] not display in com_contat form
avatar joomla-cms-bot joomla-cms-bot - edited - 1 Nov 2016
avatar infograf768 infograf768 - change - 1 Nov 2016
Title
[com_fields] not display in com_contat form
[com_fields] not display in com_contact form
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2016
Title
[com_fields] not display in com_contat form
[com_fields] not display in com_contact form
avatar laoneo
laoneo - comment - 1 Nov 2016

This fields do belong to the front end form. You will see the fields on the contact form on the front end.

avatar ymages
ymages - comment - 1 Nov 2016

no they are not on the frontend form
the text field is disabled and the radio buttons are not displayed

the code displayed on front end

<form id="contact-form" action="/j37/index.php/contact-form" method="post" class="form-validate form-horizontal well">
                                                            <fieldset>
                                            <legend>Send an Email</legend>
                                                                                        <div class="control-group">
            <div class="control-label">
            <span class="spacer"><span class="before"></span><span class="text"><label id="jform_spacer-lbl" class=""><strong class="red">*</strong> Required field</label></span><span class="after"></span></span>                    </div>
        <div class="controls"> </div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_contact_name-lbl" for="jform_contact_name" class="hasPopover required" title="" data-content="Your name." data-original-title="Name">
    Name<span class="star">&nbsp;*</span></label>
                    </div>
        <div class="controls"><input type="text" name="jform[contact_name]" id="jform_contact_name" value="" class="required" size="30" required="required" aria-required="true">
</div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_contact_email-lbl" for="jform_contact_email" class="hasPopover required" title="" data-content="Email Address for contact." data-original-title="Email">
    Email<span class="star">&nbsp;*</span></label>
                    </div>
        <div class="controls"><input type="email" name="jform[contact_email]" class="validate-email required" id="jform_contact_email" value="" size="30" autocomplete="email" required="required" aria-required="true"></div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_contact_emailmsg-lbl" for="jform_contact_emailmsg" class="hasPopover required" title="" data-content="Enter the subject of your message here." data-original-title="Subject">
    Subject<span class="star">&nbsp;*</span></label>
                    </div>
        <div class="controls"><input type="text" name="jform[contact_subject]" id="jform_contact_emailmsg" value="" class="required" size="60" required="required" aria-required="true">
</div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_contact_message-lbl" for="jform_contact_message" class="hasPopover required" title="" data-content="Enter your message here." data-original-title="Message">
    Message<span class="star">&nbsp;*</span></label>
                    </div>
        <div class="controls"><textarea name="jform[contact_message]" id="jform_contact_message" cols="50" rows="10" class="required" required="required" aria-required="true"></textarea></div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_contact_email_copy-lbl" for="jform_contact_email_copy" class="hasPopover" title="" data-content="Sends a copy of the message to the address you have supplied." data-original-title="Send a copy to yourself">
    Send a copy to yourself</label>
                            <span class="optional">(optional)</span>
                    </div>
        <div class="controls"><input type="checkbox" name="jform[contact_email_copy]" id="jform_contact_email_copy" value="1"></div>
</div>
                                    </fieldset>
                                                                                                    <fieldset>
                                            <legend>Fields</legend>
                                                                                        <div class="control-group">
            <div class="control-label">
            <label id="jform_params_field_mail_sex-lbl" for="jform_params_field_mail_sex" class="">
    Sex</label>
                            <span class="optional">(optional)</span>
                    </div>
        <div class="controls"><fieldset id="jform_params_field_mail_sex" class="radio" disabled="">

    </fieldset>
</div>
</div>
                                                                    <div class="control-group">
            <div class="control-label">
            <label id="jform_params_mail_field_job-lbl" for="jform_params_mail_field_job" class="">
    Job</label>
                            <span class="optional">(optional)</span>
                    </div>
        <div class="controls"><input type="text" name="jform[params][mail-field-job]" id="jform_params_mail_field_job" value="" disabled="">
</div>
</div>
                                    </fieldset>
                            <div class="control-group">
            <div class="controls">
                <button class="btn btn-primary validate" type="submit">Send Email</button>
                <input type="hidden" name="option" value="com_contact">
                <input type="hidden" name="task" value="contact.submit">
                <input type="hidden" name="return" value="">
                <input type="hidden" name="id" value="1:contact-form">
                <input type="hidden" name="2c0b5a8a134b8e672ef31fe0ecdf3e5b" value="1">         </div>
        </div>
    </form>
avatar ymages
ymages - comment - 1 Nov 2016

text field disabled
radio button not displayed

screenshot 2016-11-01 a 16 08 59

avatar laoneo
laoneo - comment - 1 Nov 2016

You need to set the edit value permission for the public group to allowed.

avatar ymages
ymages - comment - 1 Nov 2016

in User Groups > Edit > allowed , nothing changes
in the field itself > Permissions > all to Allowed , but nothing change

and allow editing to public for all is not what one want, one want only permissions for contact custom fields

avatar laoneo
laoneo - comment - 2 Nov 2016

I was talking about the "Edit Value" permission
image

avatar ymages
ymages - comment - 2 Nov 2016

ok now it works for textarea but not for radio buttons, they are not displayed

<div class="controls"><fieldset id="jform_params_field_mail_sex" class="radio"></fieldset></div>

avatar infograf768
infograf768 - comment - 2 Nov 2016

Concerning permissions, see #12693

avatar ymages
ymages - comment - 2 Nov 2016

@infograf768 I have set the permissions but button radio are not displayed

avatar infograf768
infograf768 - comment - 2 Nov 2016

I meant that permissions are flawed imho in com_fields. They are unsufficient at best.

avatar laoneo
laoneo - comment - 2 Nov 2016

@infograf768 please discus the sense of the new permission in #12693 and not here. The problem is that the checkbox is not shown properly.

avatar ymages
ymages - comment - 2 Nov 2016

@laoneo I did something wrong with radio buttons or do you get the same result than me ?

thanks a lot for your work and I keep on trying all :-)

avatar brianteeman brianteeman - change - 2 Nov 2016
Category com_fields
avatar laoneo
laoneo - comment - 2 Nov 2016

Yes, also on the back end. I try to fix it...

avatar laoneo
laoneo - comment - 2 Nov 2016

Glad to hear that the rest is working. Please test #12698 which should fix the display issue for radio buttons and checkboxes.

avatar ymages
ymages - comment - 2 Nov 2016

Not sure if I did it right
libraries/joomla/form/parameters/radio.xml
the xml value now :

<field
name="name"
label="JLIB_FORM_FIELD_PARAM_RADIO_MULTIPLE_VALUES_KEY_LABEL"
size="30"
type="text"
/>

doesn't work , no radio button in frontend

and I have another problem in backend, the tab fields doesnt exist anymore
screenshot 2016-11-02 a 16 04 49

avatar laoneo
laoneo - comment - 3 Nov 2016

You need to save the values again when you edit the radio field.

avatar ymages
ymages - comment - 5 Nov 2016

I saved the values again
options-cf
but what I get is wrong
form-cf

the displayed code

<fieldset id="jform_params_field_mail_sex" class="radio">
<input type="radio" id="jform_params_field_mail_sex0"
 name="jform[params][field-mail-sex]" 
value="M">
<label for="jform_params_field_mail_sex0">1</label>
<input type="radio" id="jform_params_field_mail_sex1" 
name="jform[params][field-mail-sex]" 
value="F">
<label for="jform_params_field_mail_sex1">F</label>
</fieldset>

it should be

<input type="radio" id="jform_params_field_mail_sex1" 
name="jform[params][field-mail-sex]" 
value="1">
<label for="jform_params_field_mail_sex1">M</label>
<input type="radio" id="jform_params_field_mail_sex0" 
name="jform[params][field-mail-sex]" 
value="0">
<label for="jform_params_field_mail_sex0">F</label>

in the admin panel there is no fields tab anymore
admin-missing-tab
this fields tab exists in com_content

Send a copy to yourself should be just before the button send email and not between the core and custom fields but maybe it can be fixed with view overrides

thanks for your work

avatar ymages
ymages - comment - 5 Nov 2016

if I submit the contact form I get that email

This is an enquiry email via http://192.168.178.20/j37/ from:
My Name<my@email>

contenu de mon message

<br />
<b>Notice</b>:  Undefined property: stdClass::$render_class in <b>/www/j37/components/com_contact/layouts/field/render.php</b> on line <b>19</b><br />
Sex: F
<br />
<b>Notice</b>:  Undefined property: stdClass::$render_class in <b>/www/j37/components/com_contact/layouts/field/render.php</b> on line <b>19</b><br />
Job: photographe

job: photographe is the custom field type= text (it works)

avatar laoneo
laoneo - comment - 7 Nov 2016

The render notice should be solved with the merge of PR #12729.

The key value confusion is discussed here #12739. You need to flip the values and keys in the list definition.

avatar laoneo
laoneo - comment - 14 Nov 2016

Can you please test it with the most actual code from staging as most of the issues you experience should be solved now. Thanks.

avatar ymages
ymages - comment - 14 Nov 2016

I never know what to download and install exactly, is there a very las version of joomla with your code ?

thank you

avatar laoneo
laoneo - comment - 14 Nov 2016

You can download the latest builds from here https://developer.joomla.org/nightly-builds.html.

avatar ymages
ymages - comment - 17 Nov 2016

new install J37 last version

same radio buttons Field, I get the email

This is an enquiry email via http://192.168.178.20/j37/ from:
NAME <myname@gmail.com>

MESSAGE

<dl class="fields-container article-info muted"></dl>

with dl class="fields-container article-info muted"... instead of the radio value

and as I said before the fields tab is not displayed any more in the contact form edit, it's missing

<ul class="nav nav-tabs" id="myTabTabs"><li class="active"><a href="#details" data-toggle="tab">Edit Contact</a></li><li class=""><a href="#misc" data-toggle="tab">Miscellaneous Information</a></li><li class=""><a href="#attrib-display" data-toggle="tab">Display</a></li><li class=""><a href="#attrib-email" data-toggle="tab">Form</a></li><li class=""><a href="#publishing" data-toggle="tab">Publishing</a></li></ul>

displayed in com_content but missing in com_contact
<li class=""><a href="#attrib-fields-0" data-toggle="tab">Fields</a></li>

avatar ymages
ymages - comment - 17 Nov 2016

If I create a field group my-fields it is not displayed in the box Field Group Type or select a group , even by typing
screenshot 2016-11-17 a 10 27 02

avatar ymages
ymages - comment - 22 Nov 2016

any news ? :-)

avatar laoneo
laoneo - comment - 24 Nov 2016

I need to test that, sorry for the late response, but I was occupied with some other things.

avatar ymages
ymages - comment - 24 Nov 2016

no problem ... I wasn't sure if you had seen my replies, thanks for your work

avatar laoneo
laoneo - comment - 26 Nov 2016

I'v just tested it with the latest code from staging and it worked. Here is a screenshot about my form
image

And here the raw output which will be sent by mail

This is an enquiry email via http://joomla.box/cms/ from:
Test <test@test.com>

Demo

Dep: Accounting, Development

So I suggest that you are doing a new installation of the most actual Joomla code and then redo the test again.

avatar laoneo
laoneo - comment - 14 Dec 2016

Can we close this one?

avatar laoneo
laoneo - comment - 26 Jan 2017

I guess we can close this one as, as I and other have been testing contacts extensively in the last weeks.

avatar Bakual
Bakual - comment - 26 Jan 2017

Closing as there was no response.

avatar Bakual Bakual - change - 26 Jan 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-26 08:39:20
Closed_By Bakual
avatar Bakual Bakual - close - 26 Jan 2017
avatar ymages
ymages - comment - 1 May 2017

the new fields are disabled

avatar brianteeman
brianteeman - comment - 1 May 2017

Check the permissions for the field!

avatar ymages
ymages - comment - 1 May 2017

Thanks but what should be the permissions ? that it works as expected for everybody

avatar ymages
ymages - comment - 1 May 2017

ok now it works but if I get the email the custom field is displayed in that way

<div class="field-container" data-alias="">
<span class="field-label">telefon: </span>
<span class="field-value">0</span>
</div>
`

how can I customize the email ?

thank you

avatar laoneo
laoneo - comment - 1 May 2017

That doesn't really makes sense. Can you open please a new issue which describes the problem and what do you expect for the fields? Thanks.

avatar ymages
ymages - comment - 1 May 2017

I have really no idea how works Github and where to open a new issue

avatar brianteeman
brianteeman - comment - 1 May 2017

Goto https://issues.joomla.org

On 1 May 2017 6:38 p.m., "ymages" notifications@github.com wrote:

I have really no idea how works Github and where to open a new issue


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12673 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8bVbu6fEdDL7mh51GvYPSPSH_h_aks5r1hiCgaJpZM4Kl4Rw
.

avatar ymages
ymages - comment - 1 May 2017

thanks

avatar ymages
ymages - comment - 4 May 2017

Warning: SimpleXMLElement::__construct(): Entity: line 2: parser error : Entity 'auml' not defined in /libraries/joomla/form/form.php on line 728

Warning: SimpleXMLElement::__construct(): ZahnarztZahnä in /libraries/joomla/form/form.php on line 728

Warning: SimpleXMLElement::__construct(): ^ in /libraries/joomla/form/form.php on line 728

avatar laoneo
laoneo - comment - 4 May 2017

Please open a new issue with the steps to reproduce your error. Make sure you are using the 3.7 final version. Thanks.

avatar ymages
ymages - comment - 4 May 2017

I am using the 3.7 final version
if you write a char like ä or a letter with any accent on custom field type list you get that error

line 728 = $data = new SimpleXMLElement($data);

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 May 2017

@ymages Please open a new issue with the steps to reproduce your error as @laoneo wrote, thanks.

avatar laoneo
laoneo - comment - 4 May 2017

Can somebody lock that issue please?

avatar brianteeman
brianteeman - comment - 4 May 2017

locked as requested

Add a Comment

Login with GitHub to post a comment