0

I'm trying to figure out a way to display and not have a profile:edit field be editable.

If I try and remove the {custom_fields} tag and add each input field separately, the data won't save.

Any clue how to do this?

1

Are you trying to display them, or edit/save them? To display them you can just show the fields not as inputs?

  • Trying to edit/save all but one field. I'm trying to just display the one field. If I don't use the {custom_fields} tag (which outputs all the fields), I can't figure out how to make all but that one field editable. – Lisa Ellington Mar 12 '15 at 16:26
  • OK got it. So the easiest thing to do is use the {custom_fields} loop as a basis for your form. Then, view the code it outputs and copy what you need - changing just the one input in question to simply display the field's contents and not be an input. You can also use P:E's global variables setting to allow for fields to be used as global variables in your templates. – Jessica D'Amico Mar 12 '15 at 17:41
  • I get that -- but i don't know how to write the code to make it work. right now I have {custom_fields} {if text} <input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" /> {/if} {/custom_fields} Can I write an if statement to display the text for the one field rather than create a text input? I'm just confused on how to do this. – Lisa Ellington Mar 12 '15 at 20:13
  • What I meant was literally view source of the generated form that the stock template creates. Then take that form with its properly named inputs and remove only the one you don't want to include. Using the {custom_fields} tag means that all fields will be included I believe. By getting the generated form and its values you can add/subtract inputs as you like. – Jessica D'Amico Mar 12 '15 at 20:41
  • I tried that and it didn't work -- hmm...let me double check to make sure my test value was correct, that could have been the problem (it was late, i was tired) – Lisa Ellington Mar 12 '15 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.