I have a cred form designed to edit a post, that works all fine.
However, is iit possible to add another field for the edit, I would like to seperate the added text form the original text.
Related; Is it possible to show the original fields (name, address etc) but hide them from editing in this edit post form?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
Thank you for contacting our support forum.
You mean just have the field be read only ?
If you send me a link to the form I can write some code to disable the fields from editing for you.
Please let me know .
Thanks,
Shane
Hi Shane,
I wish only the field "toelichting" should be editable. The rest read-only.
[credform]
<div class="form-group">
<label>ABC Nieuwe lead Title</label>
[cred_field field="post_title" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Voorletters</label>
[cred_field field="voorletters" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Naam</label>
[cred_field field="naam" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Adres</label>
[cred_field field="adres" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Postcode</label>
[cred_field field="postcode" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Plaats</label>
[cred_field field="plaats" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Telefoon</label>
[cred_field field="telefoon" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>E-mail</label>
[cred_field field="e-mail" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Product</label>
[cred_field field="product" force_type="field" class="form-control" output="bootstrap"]
</div>
<div class="form-group">
<label>Toelichting</label>
[cred_field field="toelichting" force_type="field" class="form-control" output="bootstrap"]
</div>
[cred_field field="form_submit" output="bootstrap" value="Wijzigen" class="btn btn-primary btn-lg"]
[/credform]
Regarding the field "toelichting" will it be possible to ad another field "toelichting(1)" when the post is edited?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
I'm assuming that these fields are text fields.
So what you can do is add the attribute readonly='true' to the cred_field shortcodes and it should disable the fields.
Thanks,
Shane
Thank you, that will sove that issue.
Regarding the intitial question, can you give support on that or should I start a new ticket.
So basically I would like to edit the post but with a new textfield.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
Regarding your original issue. Let me know if I got this correctly.
Is it that you want to add a new field for the text on the edit form but leave the original field in tact? Or is it that you just want an additional field on the edit form.
Please let me know.
Thanks,
Shane
Shane,
Sorry if it wasn't clear.
I would like to leave the original field in tact.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
You should be able to do this, if you add a generic cred field to your edit form.
On your form all you need to do is Click the Add generic field button then add your field type.
This should allow you to have the additional field to your text form.
Thanks,
Shane
Thank you Shane for the solution.
The only thing is that I am now struggling how to get this in the VIEW once the correction is saved.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
This part should be quite simple as well.
Could you let me know the slug of the field that you added ? The generic field.
You can display it in a view by just using this.
[wpv-post-field name='slug'] where you will replace slug with the slug of the custom field.
Thanks,
Shane
It seems simple but somehow I can't get it working.
1. I have encluded the generic field to the form where to edit the post.
2. If I check the post in the backoffice, i don't see it. Therefor it doesn't also become visible in the frontend.
Will it be possibe to check for me directly on the site?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
Yes I can check for you .
I've enabled the private fields for your next response.
Please let me know the Post that I should be looking at.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Simon,
This should be working now.
What was needed is for it to be set to save to the database by using the "persist: 1" attribute.
Thanks,
Shane
My issue is resolved now. Thank you!