Developer forum

Forum » Development » Custom Fields AccesUser DW8 not rendered?

Custom Fields AccesUser DW8 not rendered?

Martijn Bokhove
Reply
Hi

We're having a problem using Custom User fields in DW8.

In the attachment you can see wat the problem is.
We have created Custom Fields, but are not able to fill the Custom Fields frontend.
The Custom Fields are visible in the TemplateTags, but don't show up as HTML element.

This is the way we always worked with Custom Fields, with no problems. Only with DW8 it seems that it not works.
How can we use the Custom Fields in DW8?

Gr
Martijn

Replies

 
Vladimir
Reply
This post has been marked as an answer
Hi Martijn,
try to use such template:

<input type="text" name="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" id="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" value="<!--@UserManagement:User.VATnr-->" />

or 
		<!--@LoopStart(UserManagement:User.CustomFields)-->
		<tr>
			<th align="left"><!--@CustomField.Name-->(<!--@CustomField.Type-->): </th>
			<td><input type="text" name="CustomField.AccessUser_<!--@CustomField.SystemName-->" id="CustomField.AccessUser_<!--@CustomField.SystemName-->" value="<!--@CustomField.Value-->" /></td>
		</tr>		
		<!--@LoopEnd(UserManagement:User.CustomFields)-->

Best regards,
Vladimir


Votes for this answer: 0
 
Martijn Bokhove
Reply

Hi Vladimir

It seems that the tags for the custom fields are not rendered when there is extra code between the quotes:

Template (with single quotes)

 <div class="input_text">
	<div class="input_right">
	<input type="text" name='CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->' id='CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->' value='<!--@UserManagement:User.VATnr-->' />
	</div>
</div>

HTML Output:
<div class="input_text">
                        <div class="input_right">
                            <input type="text" name='CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->' id='CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->' value='<!--@UserManagement:User.VATnr-->' />
                        </div>
                    </div>

Template (with double quotes)
<div class="input_text">
                        <div class="input_right">
                        <input type="text" name="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" id="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" value="<!--@UserManagement:User.VATnr-->" />
                        </div>
                    </div>
HTML Output:
<div class="input_text">
                        <div class="input_right">
                        <input type="text" name="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" id="CustomField.AccessUser_<!--@UserManagement:User.VATnr.Name-->" value="<!--@UserManagement:User.VATnr-->" />
                        </div>
                    </div>

With your help I added the loop for the custom fields.
With help from the loop I see that the correct HTML code for the field is:

<input type="text" name="CustomField.AccessUser_AccessUser_VATnr" id="CustomField.AccessUser_AccessUser_VATnr" value="" />
For each CustomField we have added the HTML from the Loop in the template, all new CustomFields are now  saved correctly.

Thank you very mutch for your support!!

Gr
Martijn
 
Andrew Mannell
Reply

Hi Martijn

 

we have a similar problem could you post the final code!


We are looking to add the field as screenshot attached, to the shop cart validation page, we would like them to appear and be editable as the other standard fields are?

 

From this


 

 

:

 

 

 

I get:

     



 
:

 


     

 

 

Thanks

 

<!--@LoopStart(UserManagement:User.CustomFields)-->
<tr>
    <th align="left"><!--@CustomField.Name-->(<!--@CustomField.Type-->): </th>
    <td><input type="text" name="CustomField.AccessUser_<!--@CustomField.SystemName-->" id="CustomField.AccessUser_<!--@CustomField.SystemName-->" value="<!--@CustomField.Value-->" /></td>
</tr>    
<!--@LoopEnd(UserManagement:User.CustomFields)-->

Screen_shot_2013-02-04_at_9.53.40_PM.png
 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Andrew,

 

 

If I read your question correctly, then you're trying to get the AccessUser custom fields to be rendered in the Shopping Cart flow. This is not possible. This is also a different problem than what the original poster experienced.

 

 

If you want some sort of custom fields in the checkout flow, then consider using custom order fields or custom orderline fields instead as these are meant to allow for additional information on the order/orderlines. Custom fields on Access User (User Management) are meant for additional information on the user.

 

 

Hope this helps :)

 

 

- Jeppe

 
Andrew Mannell
Reply

Hi Jeppe,

Thanks for the answer, we need the user to confirm extra information from his profile during the order process, I would have thought this is fairly standard feature as this could be needed for thousands of reasons. At least it should be in the email order notification that is sent.

I posted it here as the results are the same the tags are just not rendered and I did not even think that this could not be possible, a user profile "invoice address" including custom fields can not be checked during the order process?

If I use custom orderline fields instead, will they stay for all orders from this customer? Any ideas?

If this is not a feature by Dynamicweb I will add a feature request as it breaks all common sense :-(

Thanks in advance!

Andy

 
Asger Munkholm Højfeldt
Reply

Hi Martijn and Andy, 

I'll interrupt this conversation as the term "feature request" enters - and that's my business :-)

As Jeppe wrote the functionality has never been in Dynamicweb but might be a good suggestion - I will bring this request to our next Product Management meeting (end of this month) for a discussion. I'll get back here with an answer. 

//Asger - Product Manager

 

You must be logged in to post in the forum